DB2 Version 9.7 for Linux, UNIX, and Windows

lock_count - Lock count monitor element

The number of locks on the lock being held.

Table 1. Snapshot Monitoring Information
Snapshot Level Logical Data Grouping Monitor Switch
Lock lock Basic
Table 2. Event Monitoring Information
Event Type Logical Data Grouping Monitor Switch
Locking - -
Deadlocks1 lock -
Deadlocks1 event_dlconn -
1
This option has been deprecated. Its use is no longer recommended and might be removed in a future release. Use the CREATE EVENT MONITOR FOR LOCKING statement to monitor lock-related events, such as lock timeouts, lock waits, and deadlocks.

Usage

This value ranges from 1 to 255. It is incremented as new locks are acquired, and decremented as locks are released.

When the lock_count monitor element has a value of 255, this indicates that a transaction duration lock is being held. At this point, the lock_count monitor element is no longer incremented or decremented when locks are acquired or released. The lock_count monitor element is set to a value of 255 in one of two possible ways:
  1. The lock_count monitor element value is incremented 255 times due to new locks being acquired.
  2. A transaction duration lock is explicitly acquired. For example, with a LOCK TABLE statement, or an INSERT.