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 timeout

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-15-06, 10:20
Ravi_R Ravi_R is offline
Registered User
 
Join Date: Mar 2006
Posts: 16
Lock timeout

Hi,
I am trying to log the transactions ids and the statements that are running at the point of a lock timeout error (both the locking transaction and the locked out transaction) - unfortunately in db2 there are no event monitors for timeouts (unlike deadlocks) - any ideas if this type of error can be captured to diagnose and possible tune the offending sql??

The reason i am doing this is because batch jobs that run at nite fail on a lock timeout and i would like to know whats possibly causing the contention

P.S - am on db2 v8.2 fp 3 - aix 5.3

Tks
Reply With Quote
  #2 (permalink)  
Old 11-15-06, 20:34
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I think creating an event monitor for statements and/or transactions should help.
Reply With Quote
  #3 (permalink)  
Old 11-16-06, 11:16
Ravi_R Ravi_R is offline
Registered User
 
Join Date: Mar 2006
Posts: 16
Tks N.I
i am using snapshot monitors currently but there is no way to isolate the sqls that is causing the timeout -plus there is overhead involved- just wondering if anyone is using a different method to capture transactions involved in a lock timeout scenario to troubleshoot.
Reply With Quote
  #4 (permalink)  
Old 11-16-06, 12:45
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
You realize that snapshot monitors and event monitors are different things, right?

Even if using snapshots, you could kick up the lock timeout setting to an interval that is longer than the interval between snapshot, which will show you the applications holding the locks.
Reply With Quote
  #5 (permalink)  
Old 11-17-06, 10:17
Ravi_R Ravi_R is offline
Registered User
 
Join Date: Mar 2006
Posts: 16
I think snapshot monitors for lock waits will work if i also capture the statements executing at the same moment -tks
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