user1340582
user1340582

Reputation: 19699

Monitoring IBM DB2 9.7 locks

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

Answers (2)

Anonymous
Anonymous

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

Ian Bjorhovde
Ian Bjorhovde

Reputation: 11032

There are lots of options.

  1. Use views in the SYSIBMADM schema (LOCKWAITS, LOCKS_HELD, MON_LOCKWAITS…)

  2. Use MON_GET_LOCKS or MON_GET_APPL_LOCKWAIT table functions

  3. Use db2top

There are GUI tools as well.

Upvotes: 1

Related Questions