Page 1 of 1

Unlock Table

Posted: Mon May 21, 2007 10:16 pm
by cosec
Hi

I need to unlock a DB2 Table. How do I do this ?

I was trying to load to a target table and then i aborted the job as it was taking a long time. The target table is empty and I wanted to verify it. When I clicked view data it hung up.
I am assuming this is due to a table lock..Please help as to how I can release it ? or if I need to have the DBA do it ?

Posted: Mon May 21, 2007 11:30 pm
by chulett
Enlist the help of your DBA. Have them verify if that is indeed the issue.

Posted: Mon May 21, 2007 11:42 pm
by skumar
cosec,

If possible generate the DDL of your table structure and as you said there is nothing in that table you can rebuild the table once again.I feel this also help you out(if you have the privileges to create/drop) or take the help of DBA.

Thanks,
skumar

Posted: Tue May 22, 2007 7:49 am
by DSguru2B
If its DB2UDB and the table is empty only then, you can do a Load from /dev/null. This also gets rid of any table locks on UDB's. Get the exact syntax from google by searching for "How to truncate a UDB table?"
Only try this if its UDB. If its DB2, then all the tables in that particular table space will get truncated.