Originally posted by mteruggi I.
Is there someone who can tell me how I can remove table lock on IDS 7.31 without shutdown the instance?
Thanks in advance
First you need to determine who is holding the lock on the
table. Perform the following steps:
1) get hexadecimal partitionnumber of this table
-> select tabname, hex(partnum) from systables
where tabname = "<yourtabname>"
2) Check if there are any locks placed on this table
-> onstat -k | grep -i <hex_partnum>
3) Get the 3rd column (owner) from the above grep-command
and use this in the following command
-> onstat -u | grep -i <owner_value>
Now you have the session-ID of the user holding the lock in
the 3rd column of the output from command 3).
You can use this session-ID to terminate the session using
"onmode -z <session_id>".
A few things to consider:
Only locks with type "HDR+X" or "HDR+S" and rowid "0"
from command 2) are real table locks.
It might also be that there are individual row or page locks on
the table or an open cursor which prevents you from locking
the table exclusively.
Command 2) should give you the details.
You might also consider using my lockwait-program, which might help you analyzing these lock situations. You can download it
from the following URL: