When try to delete a model it shows a dialog box error advising that the model is checked out and therefore it cannot be deleted.
However attempts to override model displays dialog box error that there are no check outs for the model.
There also no subsets checked out.
How can the model be deleted?
Release : 8.6
Component : Gen Client Server Encyclopedia
All subsets were deleted to try to delete the model which was still not possible.
Even after deleting all subsets, when list Models in Encyclopedia Client the model showed '*********' for the Checkout User Id which indicates that a subset is still checked out.
Also in line with that this SQL returned 1 row with a non-zero CKO_SUBSET_ID value and CKO_SUBSET_ALL='N', indicating a subset is checked out:
SELECT * FROM DCKOID WHERE CKO_MODEL_ID = model_id;
Given all the information, it appears that the model is in a corrupt state.
The recommendation would be to change the DMDL table MODEL_STATUS column for this one model from value 'M' ("modifiable") to value 'U' ("unusable") i.e.
SELECT * FROM DMDL WHERE MODEL_NAME = 'model_name';
UPDATE DMDL SET MODEL_STATUS='U' WHERE MODEL_NAME = 'model_name';
Then run the Cleanup for the CSE which will remove all models with a Model_Status of 'U'.
Reference the documentation: Perform the CSE Cleanup
NOTE: Before running any UPDATE SQL against a CSE database it is highly recommend that the database is backed up.