If you find faulty CMDB statuses in i-doit pro which you cannot delete, then you can do the following.
Create a backup before executing the queries.
ATTENTION: The standard values should not be deleted! This can be recognized by the constant in the
The CMDB status can be output with the following query:
SELECT * FROM isys_cmdb_status;
The next query checks whether an object has this incorrect CMDB status:
SELECT * FROM isys_obj WHERE isys_obj__isys_cmdb_status__id = FEHLERHAFTER-CMDB-STATUS-ID
If the query returns results, then there are objects that have an incorrect CMDB status. These must first be cleaned up manually or the correct CMDB status must be set with:
UPDATE isys_obj SET isys_obj__isys_cmdb_status__id = KORREKTER-CMDB-STATUS-ID
WHERE isys_obj__isys_cmdb_status__id = FEHLERHAFTER-CMDB-STATUS-ID;
When everything is cleaned up, you can remove the CMDB statuses individually with this query:
DELETE FROM isys_cmdb_status WHERE isys_cmdb_status__id = FEHLERHAFTER-CMDB-STATUS-ID
AND isys_cmdb_status__const IS NULL;