Locking / Locks
Purpose
Locks view shows the list of locks in the currently connected database.
Screenshot
![image image](/dmctop-wiki/static/287b28f2b3b217f19903d14861a8e682/3cbba/locks.png)
Metric shown
Grid
Locks held
The number of locks in the currently connected database.
SELECT COUNT(*) AS LOCKS_HELDFROM TABLE(MON_GET_LOCKS(NULL, #MEMBER#))
Source: MON_GET_LOCKS
Agents waiting
The number of locks that each application’s agents (that are connected to the current database) are waiting to acquire.
SELECT COUNT(*) AS LOCKS_WAITFROM TABLE(MON_GET_APPL_LOCKWAIT(NULL, #MEMBER#))
Source: MON_GET_APPL_LOCKWAIT
Lock list storage %
The average number of locks per byte.
= LOCKS_HELD / LOCK_LIST_IN_USE_BYTES
LOCKS_HELD =
SELECT COUNT(*) AS LOCKS_HELDFROM TABLE(MON_GET_LOCKS(NULL, #MEMBER#))
Source:
LOCK_LIST_IN_USE_BYTES = MON_GET_DATABASE(#MEMBER#).SUM(LOCK_LIST_IN_USE)
Applications connected
The number of connections from the given database member.
SELECT COUNT(*) AS APPL_CONNECTEDFROM TABLE(MON_GET_CONNECTION(NULL, #MEMBER#))
Source: MON_GET_CONNECTION
Table
Application handle
A system-wide unique ID for the application.
Source: MON_GET_LOCKS(NULL,#MEMBER#).APPLICATION_HANDLE
Application name
The name of the application running at the client.
Source: MON_GET_AGENT(NULL,NULL,NULL,#MEMBER#).APPLICATION_NAME
Event state
State of the event last processed by this agent. The possible values are as follows:
- EXECUTING
- IDLE
Source: MON_GET_AGENT(NULL,NULL,NULL,#MEMBER#).EVENT_STATE
Event type
Type of event last processed by this agent. The possible values are as follows:
- ACQUIRE
- PROCESS
- WAIT
Source: MON_GET_AGENT(NULL,NULL,NULL,#MEMBER#).EVENT_TYPE
Event object
Object of the event last processed by this agent. The possible values are as follows:
- COMPRESSION_DICTIONARY_BUILD
- IMPLICIT_REBIND
- INDEX_RECREATE
- LOCK
- LOCK_ESCALATION
- QP_QUEUE
- REMOTE_REQUEST
- REQUEST
- ROUTINE
- WLM_QUEUE
Source: MON_GET_AGENT(NULL,NULL,NULL,#MEMBER#).EVENT_OBJECT
Object name
The name of event object.
= <TABSCHEMA>.<TABNAME>
Source:
TABSCHEMA = MON_GET_TABLE(NULL,NULL, #MEMBER#).TABSCHEMA
TABNAME = MON_GET_TABLE(NULL,NULL, #MEMBER#).TABNAME
Lock mode
The type of lock being held.
Source: MON_GET_LOCKS(NULL,#MEMBER#).LOCK_MODE
Object type
The type of object against which the application holds a lock (for object-lock-level information), or the type of object for which the application is waiting to obtain a lock (for application-level and deadlock-level information).
Source: MON_GET_LOCKS(NULL,#MEMBER#).LOCK_OBJECT_TYPE
Lock status
The internal status of the lock.
Source: MON_GET_LOCKS(NULL,#MEMBER#).LOCK_STATUS
Lock count
The number of locks currently held.
Source: MON_GET_LOCKS(NULL,#MEMBER#).LOCK_COUNT
Is blocker
Flag (Yes or No) indicating whether the transaction holding this lock is itself blocked waiting on another lock.
Locked by
The application that is holding the lock.
If the LOCK_STATUS column is W or C, then get the application handle id of the first object from the lock list with LOCK_STATUS equals to G with given LOCK_NAME.
Source:
LOCK_STATUS = MON_GET_LOCKS(NULL,#MEMBER#).LOCK_STATUS
LOCK_NAME = MON_GET_LOCKS(NULL,#MEMBER#).LOCK_NAME
Tablespace name
The name of a table space.
Source: MON_GET_TABLESPACE.TBSP_NAME