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 > I need a LOCKLIST to see how many Locks Hold

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-25-09, 08:34
mr-sansibar mr-sansibar is offline
Registered User
 
Join Date: Jun 2009
Posts: 9
I need a LOCKLIST to see how many Locks Hold

Hallo !
I am a DB2 Beginner.
My issue is, when i write in a table a error message appears:
Error executing statement 'LOCK Table db2.table1 IN EXCLUSIVE MODE'.
I need a tool or an other way to see some Snapshot on all applications.
Then in those SNAPSHOTs, search for the "SELECT and INSERT" statements. I will get to see some more details, on how many Locks Hold, whether there was any EXCLUSIVE locks etc.

Thanks

sansibar
Reply With Quote
  #2 (permalink)  
Old 06-25-09, 09:09
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Go to the sticky note "Useful DB2 Stuff" and look for a link to a graphical snapshot monitor.

What DB2 version and OS are you using? Why are you doing an exclusive table lock?

Andy
Reply With Quote
  #3 (permalink)  
Old 06-30-09, 09:21
coolwinds coolwinds is offline
Registered User
 
Join Date: Apr 2007
Posts: 6
For DB2 v9 you can try below scripts:
Quote:
Select substr(ai.appl_name,1,10) as Application,
substr(ai.primary_auth_id,1,10) as AuthID,
int(ap.locks_held) as "# Locks",
int(ap.lock_escals) as "Escalations",
int(ap.lock_timeouts) as "Lock Timeouts",
int(ap.deadlocks) as "Deadlocks",
int(ap.int_deadlock_rollbacks) as "Dlock Victim",
substr(inbound_comm_address,1,15) as "IP Address"
from sysibmadm.snapappl ap, sysibmadm.snapappl_info ai
where ap.agent_id = ai.agent_id
;
----------------
Eric Xu (许 昌)
Reply With Quote
  #4 (permalink)  
Old 06-30-09, 10:21
ratheeshknair ratheeshknair is offline
Registered User
 
Join Date: Jan 2009
Posts: 153
coolwinds ,REALLY GREAT SCRIPT...
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