Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lock Waiting

Status
Not open for further replies.

Hattusas

Programmer
Nov 11, 2001
344
TR
Since our clients make several inserts ,updates to our database when a connection attemps to make an insert or any other kind of thing,it is status of course becomes
"lock waiting".But what I want to learn is which application is holding what tables or rows?How can I see this.When I look at the application lists,I only see the applicaiotn id and its status etc. Salih Sipahi
Software Engineer.
City of Istanbul Turkey
openyourmind77@yahoo.com
 
Hattusas,
I believe that this information can be found in the db2 log.
Marc
 
Hiyas,
There are several things you can do to get more information. First do a "db2 get snapshot for locks on dbname" where dbname is the name of your database. This will tell you what applications are holding locks on what tables. Hopefully, this is all the info you need.
To get more information on the application's handle or id, do a "db2 get snapshot for all applications" or limit the snapshot to the particular app id you're interested in. To get even more granular in your information, you can set event monitors to capture sql events, etc. Additionally, you can turn on the various monitor switches and capture the statistics with snapshots.

Hope this helps...
 
Status
Not open for further replies.

Similar threads

M
  • Locked
  • Question
Replies
3
Views
49
Member 310024
M

Part and Inventory Search

Sponsor

Back
Top