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 > lock-wait with no other applications

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-22-09, 13:51
db2zip db2zip is offline
Registered User
 
Join Date: Apr 2009
Posts: 42
lock-wait with no other applications

Hi,

Application is in lock-wait, but when I list applications this is the only application connected to the database. What could be the reason?

Thank you!
Reply With Quote
  #2 (permalink)  
Old 07-22-09, 16:27
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Did you try list applications show detail?
__________________
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 07-22-09, 16:50
db2zip db2zip is offline
Registered User
 
Join Date: Apr 2009
Posts: 42
list applications show detail displays the same information - one application in lock-wait
Reply With Quote
  #4 (permalink)  
Old 07-22-09, 20:43
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Use snapshot / db2pd to see what it's waiting for. If this is the only appl connected to the db, then I suspect that there is an indoubt transaction.
Reply With Quote
  #5 (permalink)  
Old 07-23-09, 10:09
db2zip db2zip is offline
Registered User
 
Join Date: Apr 2009
Posts: 42
How can I tell if we have indoubt transactions?
Reply With Quote
  #6 (permalink)  
Old 07-23-09, 10:45
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
LIST INDOUBT TRANSACTIONS command

Additional info :
http://publib.boulder.ibm.com/infoce...n/t0004636.htm
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.

Last edited by sathyaram_s; 07-23-09 at 10:48.
Reply With Quote
  #7 (permalink)  
Old 07-23-09, 11:13
db2zip db2zip is offline
Registered User
 
Join Date: Apr 2009
Posts: 42
Thank you. How do I tell if we have indoubt transactions from DB2 snapshot?
Reply With Quote
  #8 (permalink)  
Old 07-23-09, 12:29
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
Read prior post
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #9 (permalink)  
Old 07-23-09, 13:32
db2zip db2zip is offline
Registered User
 
Join Date: Apr 2009
Posts: 42
But prior post doesn't tell me how to tell if my application is in lock-wait with indoubt transactions. How to tell this information from DB2 snapshots?
Reply With Quote
  #10 (permalink)  
Old 07-23-09, 13:55
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Does snapshot show you what it's waiting for?
Reply With Quote
  #11 (permalink)  
Old 07-23-09, 14:00
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
If the snapshot shows that it's waiting for an appl with an appl handle 0, then this is a very good indicator that you have an indoubt transaction that is holding the lock(s):
IBM DB2 9.5 Information Center for Linux, UNIX, and Windows
Reply With Quote
  #12 (permalink)  
Old 07-24-09, 17:10
Lenny77 Lenny77 is offline
Registered User
 
Join Date: Jul 2009
Location: NY
Posts: 886
Do you use big sized Global Temporary Tables in application ?
Also the problem could be related to the sensitive cursors.

Lenny K.
Reply With Quote
  #13 (permalink)  
Old 07-24-09, 18:35
db2zip db2zip is offline
Registered User
 
Join Date: Apr 2009
Posts: 42
Lenny, Can you explain how this problem can be related to sensitive cursors?

Snapshot showed that it was in lock-wait with application 0.
Reply With Quote
  #14 (permalink)  
Old 07-24-09, 21:10
DB2Plus DB2Plus is offline
Registered User
 
Join Date: Jul 2009
Posts: 150
Check the Isolation Level. If Isolation Level > CS, change to CS.

Also, if you make the massive update (insert or delete) inside of the program, don't forget to produce COMMIT after every, for example, 5000 updates.

Last edited by DB2Plus; 07-24-09 at 21:38.
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