DB2: Find out current locks, long transactions etc. [snapshot]
Posted by Jakub Holý on October 19, 2006
To find out current locks in a DB and other information about its current state, you need to take a “snapshot”:
db2 "attach to user using "
db2 "get snapshot for applications on " > mydatabase_snapshot.txt
Look into the resulting mydatabase_snapshot.txt for “Application ID holding” (if there is a lock, this will read the ID of the aplication holding the lock). To find long queries [that are currently running], look for “Executing”.
Sorry, the comment form is closed at this time.