Reputation: 19699
I would like to monitor database locks and deadlocks that happen during execution on our DB2 9.7. IBM has some documentation about this, which includes generation of some custom table and custom reporting mechanism. Is there really no easy way to monitor database locks e.g. using some database client like Data Studio?
Upvotes: 0
Views: 2061
Reputation: 1
If you are using any type of federation where there are updates occurring be careful using db2top or sysibmadm.locks_held (or anything that takes a snapshot for locks). Using these can cause a dead latch on the lock list entry point and will cause your database to hang and reject new connections. Has already happened to us twice. Had to kill db2 to get out of it.
Upvotes: 0
Reputation: 11032
There are lots of options.
Use views in the SYSIBMADM schema (LOCKWAITS
, LOCKS_HELD
, MON_LOCKWAITS
…)
Use MON_GET_LOCKS
or MON_GET_APPL_LOCKWAIT
table functions
Use db2top
There are GUI tools as well.
Upvotes: 1