How do you update a locked record in Documentum using DQL?

3.4k views Asked by At

I'm unable to update the record with DQL due to a lock. Is it possible to unlock the record, update it and lock it again?

I'm running the following code in idql64.exe on the content server.

UPDATE dm_document objects SET keywords = 'D' WHERE r_object_id = '90000000000000001'
GO 

Error message:

[DM_SYSOBJECT_E_LOCKED]error:
"The operation on sysobject was unsuccessful because it is locked by user

3

There are 3 answers

0
aduguid On BEST ANSWER

I was able to achieve this by updating the r_immutable_flag column.

UPDATE dm_document(all) objects SET r_immutable_flag = 0 WHERE r_object_id = '90000000000000001'
GO 
UPDATE dm_document(all) objects SET keywords = 'D' WHERE r_object_id = '90000000000000001'
GO 
UPDATE dm_document(all) objects SET r_immutable_flag = 1 WHERE r_object_id = '90000000000000001'
GO
2
Henning Winter On

You have to either unlock it by API, user interface or reset the attributes r_lock_owner and r_lock_machine. I would prefer using API or user interface. API command is

unlock,c,{object id}

and it can be easily scripted.

The issue is caused by a checkout - the user which is stated in the property above.

dqMan from FME is your friend!

Br, Henning

1
Andrey B. Panfilov On

Yes, you need to be a member of dm_escalated_allow_save_on_lock group, in this case Documentum will do everything automatically.