We are using DX UIM and the DB2 probe and want to monitor DB2 Blocking session. Is there a checkpoint to monitor this?
DX UIM 23.4.*
DB2 probe any version
Guidance
The DB2 probe will help you monitor blocking sessions. Please review the probe Metrics:
Metrics related to monitoring blocking sessions in a DB2 server typically include those that track lock-related activities and resource contention. Here are some metrics from above link that are related to monitoring blocking sessions:
These metrics provide insights into lock contention and waiting times, which are often indicators of blocking sessions in a database server.
If the out-of-the-box metrics provided by the probe and described above do not match the requirement it is possible to create a custom query.
For example, In DB2, you can query the system catalog tables to retrieve information about blocking sessions.
Here's a query that may help you identify blocking sessions:
SELECT
AGENT_ID,
APPLICATION_HANDLE,
APPLICATION_NAME,
APPL_STATUS,
MEMBER,
LOCK_WAIT_START_TIME,
LOCK_WAIT_END_TIME,
LOCK_WAIT_TIME,
LOCK_WAIT_STATE,
LOCK_WAIT_TYPE,
LOCK_NAME,
LOCK_MODE,
LOCK_OBJECT_TYPE,
LOCK_MODE_REQUESTED,
LOCK_STATUS,
LOCK_ESCALATION,
NUM_LOCKS_HELD,
ROWS_READ,
ROWS_MODIFIED,
UOW_LOG_SPACE_USED
FROM
SYSIBMADM.SNAPAPPL_INFO
WHERE
APPL_STATUS = 'UOWWAIT'
AND LOCK_WAIT_TIME > 0;
This query retrieves information about application agents that are currently waiting on locks (APPL_STATUS = 'UOWWAIT') and have been waiting for a non-zero amount of time (LOCK_WAIT_TIME > 0).
It provides details such as the agent ID, application handle, application name, lock wait start time, lock wait end time, lock name, lock mode, lock object type, lock mode requested, and various other relevant information.
You can run this query in your DB2 instance to identify blocking sessions and analyze the locking situation in your database.
Once you test this and if it matches your requirements, you can create a custom checkpoint:
See how you can create a checkpoint: