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

3

5

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

Philoprogenitive answered 31/5, 2018 at 0:42 Comment(0)
P
0

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
Philoprogenitive answered 3/6, 2018 at 6:36 Comment(0)
D
4

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

Drudgery answered 31/5, 2018 at 11:50 Comment(2)
I've upvoted your answer, but I needed to use the idql64.exePhiloprogenitive
Just upvoted this answer, and I also say that is possibile not only from DqMan, but also from DA, in Tools > API Tester.Jeffers
W
2

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

Willy answered 2/6, 2018 at 5:6 Comment(1)
Wow, famous Panfilov! And again useful tip! ;)Psychophysiology
P
0

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
Philoprogenitive answered 3/6, 2018 at 6:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.