Page 1 of 1

Enable access control for an IBM i DB2 table when it is locked

Posted: Wed Feb 09, 2022 2:58 pm
by Theju112
Hi all,

If the experts on this forum or maybe Scott klement himself can help, it would be very helpful for me!! :)

I have a db2 ALTER statement in an embedded sqlrpgle prgoram that does the below:

ALTER TABLE table name ACTIVATE column ACCESS CONTROL

but the problem is if the file is locked by another process, the statement fails. Is there any way I can make the alter to work even if the table is locked?

One strange thing I noticed is when I do a WRKOBJLCK, no lock is appearing but I can see a lock in the object_lock_info DB2 table.

Re: Enable access control for an IBM i DB2 table when it is locked

Posted: Wed Feb 09, 2022 6:12 pm
by Scott Klement
Sorry, I don't know any way to bypass the need for a lock.