If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Locks in DB2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-19-08, 03:12
pankaj.insatyam pankaj.insatyam is offline
Registered User
 
Join Date: Oct 2007
Posts: 5
Red face Locks in DB2

hello,

Is there any way to remove locks on the table in the db2?
I tried to execute snapshot command and got couple of tables locked on the schema.

I was just wondering if there is any way to remove the locks as I am not able to execute some java based commands on the database.

regards
Pankaj
Reply With Quote
  #2 (permalink)  
Old 01-19-08, 11:18
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
You can have the application holding the locks do a SQL COMMIT, or you can FORCE the application connection that is holding the locks (see Command Reference manual).
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 01-20-08, 02:39
pankaj.insatyam pankaj.insatyam is offline
Registered User
 
Join Date: Oct 2007
Posts: 5
Thanks for the information. I tried to kill the locks by FORCE application but could not execute it as I receive below error.

db2 => force application (81)
SQL1096N The command is not valid for this node type.


Any idea?

Best regards
Pankaj
Reply With Quote
  #4 (permalink)  
Old 01-20-08, 05:25
azs0309 azs0309 is offline
Registered User
 
Join Date: Jan 2008
Posts: 88
See you can always deferred the locking.
if u r on version 8.2 and higher you can use the registry variables

DB2_EVALUNCOMMITED=YES
and DB2_SKIPINSERTED=YES... you can read about these more on internet or manuals. But do test it before going to change in production systems
Reply With Quote
  #5 (permalink)  
Old 01-20-08, 10:51
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by pankaj.insatyam
Thanks for the information. I tried to kill the locks by FORCE application but could not execute it as I receive below error.

db2 => force application (81)
SQL1096N The command is not valid for this node type.


Any idea?

Best regards
Pankaj
Try using the Command Window instead of Command Processor:

db2 "force application (81)"
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On