Introduction
Before deleting an unwanted database instance, you need to make sure the database instance is not used or referenced by any other objects. That means the following conditions must be met:
- The database instance is unchecked in Project Configuration > Database Instances > All tabs in every project.
- The database instance is not used for the history list/EM Repository/Statistics/Platform Analytics in every server definition.
Steps
Option A.
If the database instance is checked in the Project Configuration > Database Instances and cannot be unchecked it means that the database instance is used by some objects in the project.
- Use KB39539 to find if any managed objects are referencing the database instance.
- If none, run the query to return the dependent objects of the database instance:
SELECT * FROM DSSMDOBJDEPN where DEPN_OBJID='The database instance GUID'; - Run this query to return the details of the dependent objects from the above query:
SELECT * FROM DSSMDOBJINFO where OBJECT_ID='The dependent object ID from the above query'; - If the dependent objects also have their dependent objects, continue to run the query in Step 2 using the GUID from the result, layer by layer, until it returns the top-level dependent objects that you can delete on GUI.
- Finally the database instance can be deleted once all the dependent objects are deleted.
Option B.
The database instance is used for the history list/EM Repository/Statistics/Platform Analytics in one of the server definitions. This can be found in the description of database instance objects in Developer as below: