Hi,
I am attempting to delete a subclass on my CMDB installation, however I have recently deleted records from this class which have status N in the database. This is preventing me from deleting the class, despite the records being marked as not active.
I have attempted to delete the records manually using SQL however I recieve the following error:
CM_FORBIDDEN_OPERATION
Can you please confirm how I can remove any old records from the database which aren't being used, alternatively propose another way of deleting un-used classes?
Many Thanks,
Jamie
Hi Jamie
,
there is no clean way to completely remove the card history. There is a trigger on the database table forbidding you to do it manually, to ensure the database consistency.
Assuming that yours is not a superclass, and you haven't got any domain on the class, you can safely issue a truncate (that bypasses that trigger):
TRUNCATE "MyTableName" CASCADE;
Otherwise it would be much more complex and we would need further details on the class domains (that have to be deleted before the class) and reference attributes pointing to that class.
Of course I strongly suggest a full backup before you do it.
Paolo