DB2 Version 9.7 for Linux, UNIX, and Windows

AM_GET_LOCK_CHN_TB procedure - Retrieve application lock chain data in a tabular format

The AM_GET_LOCK_CHN_TB procedure returns application lock chain data in tabular format. A lock chain consists of all the applications that the current application is holding up or waiting for, either directly or indirectly.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-AM_GET_LOCK_CHN_TB--(--agent_id--)--------------------------><

The schema is SYSPROC.

Procedure parameters

agent_id
An input argument of type BIGINT that specifies the agent ID of the application for which lock chain data is to be retrieved.

Authorization

  • SYSMON authority
  • EXECUTE privilege on the AM_GET_LOCK_CHN_TB procedure.

Example

Retrieve lock chain information for agent ID 68.
CALL SYSPROC.AM_GET_LOCK_CHN_TB(68)

Information returned

The procedure returns a table as shown in the following section. Each row of the table represents a lock-wait relationship. The result set also contains a row for each holding-only application; in this case, the HOLDING_AGENT_ID column is null, and the other four columns are for the holding-only application.

Table 1. Information returned by the AM_GET_LOCK_CHN_TB procedure
Column name Data Type Description
HOLDING_AGENT_ID BIGINT The agent ID of the application holding the lock.
AGENT_ID BIGINT agent_id - Application handle (agent ID) monitor element
APPL_NAME VARCHAR(255) appl_name - Application name monitor element
AUTH_ID VARCHAR(128) auth_id - Authorization ID monitor element
APPL_ID VARCHAR(64) appl_id - Application ID monitor element