Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The DBA_OB_DEADLOCK_EVENT_HISTORY view displays the history of deadlock events in the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| EVENT_ID | NUMBER(38) | NO | The event ID of the deadlock. |
| SVR_IP | VARCHAR2(46) | NO | The IP address of the node that is involved in the deadlock event. |
| SVR_PORT | NUMBER(38) | NO | The port number of the node involved in the deadlock event. |
| DETECTOR_ID | NUMBER(38) | NO | Identifier of the node ID (unique within the process) involved in the deadlock event. |
| REPORT_TIME | TIMESTAMP(6) WITH LOCAL TIME ZONE | NO | The time the dead lock is reported, based on the timestamp on the reporting server. |
| CYCLE_IDX | NUMBER(38) | NO | Indicates the number of the node in the loop. |
| CYCLE_SIZE | NUMBER(38) | NO | The number of nodes involved in the deadlock event. |
| ROLE | CLOB | NO | The role of the node in the deadlock event:
|
| PRIORITY_LEVEL | CLOB | NO | Specifies the priority level of this node. Valid values are as follows:
|
| PRIORITY | NUMBER(38) | NO | The value of the node's priority. When priorities are the same, the node with the lowest priority value is evicted |
| CREATE_TIME | TIMESTAMP(6) WITH LOCAL TIME ZONE | NO | The time when the node was created |
| START_DELAY_US | NUMBER(38) | NO | The interval in microseconds between the time the node is created and the time it is allowed to start probing for deadlocks. |
| MODULE | CLOB | NO | The module where the node resides. The value is fixed to "transaction". |
| VISITOR | CLOB | NO | The resource visitor represented by this node. The format is {session_id:$1}:{txid:$2}, where $1 and $2 are numbers. |
| OBJECT | CLOB | NO | The resource that this node is requesting to acquire. Description of the row's primary key content. The format is {addr:"$1:$2"}:{ls:$3}:{tablet:$4}:{row_key:{$5}}, where
|
| EXTRA_NAME1 | CLOB | YES | A name for extra information to be added to the deadlock event, in the wait_sql format |
| EXTRA_VALUE1 | CLOB | YES | Current SQL statement being executed when the transaction deadlocked. |
| EXTRA_NAME2 | CLOB | YES | The second name of additional information to be added to the deadlock reporting event, in the hold_sql_request_time format. |
| EXTRA_VALUE2 | CLOB | YES | The time at which the request for locking is made |
| EXTRA_NAME3 | CLOB | YES | The name of the third piece of additional information to be added to the dead lock reporting event, in the format of hold_sql |
| EXTRA_VALUE3 | CLOB | YES | SQL statements for the Object corresponding to cycle_idx - 1 rows |
Sample query
Queries the history records of deadlocks for this tenant.
obclient(SYS@oracle001)[SYS]> SELECT * FROM SYS.DBA_OB_DEADLOCK_EVENT_HISTORY;