DB2 Version 9.7 for Linux, UNIX, and Windows

lock_status - Lock status monitor element

Indicates the internal status of the lock.

Table 1. Table Function Monitoring Information
Table Function Monitor Element Collection Command and Level
MON_GET_LOCKS table function - list all locks in the currently connected database Always collected
MON_GET_APPL_LOCKWAIT table function - get information about locks for which an application is waiting Always collected
Table 2. Snapshot Monitoring Information
Snapshot Level Logical Data Grouping Monitor Switch
Lock lock Basic
Table 3. Event Monitoring Information
Event Type Logical Data Grouping Monitor Switch
Locking - -
Deadlocks1 lock -
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 element can help explain what is happening when an application is waiting to obtain a lock on an object. While it may appear that the application already has a lock on the object it needs, it may have to wait to obtain a different type of lock on the same object.

The lock can be in one of the following statuses:
G
Granted state: The application has the lock in the state specified by the lock_mode monitor element.
C
Converting state: The application is trying to change the lock held to a different type; for example, changing from a share lock to an exclusive lock.
W
Waiting state.
Note: API users should refer to the sqlmon.h header file containing definitions of database system monitor constants.