Unlock Table

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
cosec
Premium Member
Premium Member
Posts: 230
Joined: Tue May 08, 2007 8:10 pm

Unlock Table

Post 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 ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Enlist the help of your DBA. Have them verify if that is indeed the issue.
-craig

"You can never have too many knives" -- Logan Nine Fingers
skumar
Participant
Posts: 88
Joined: Thu May 25, 2006 5:11 am
Location: Hyderabad

Post 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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply