Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The GV$OB_TRANSACTION_PARTICIPANTS view displays information about participants of active transactions on all OBServer nodes.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant. |
| SVR_IP | varchar(46) | NO | The IP address of the OBServer node. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer node. |
| SESSION_ID | bigint(20) | NO | For V4.3.x:
|
| SCHEDULER_ADDR | varchar(64) | NO | The address of the OBServer node to which the scheduler belongs. |
| TX_TYPE | varchar(11) | NO | The type of the transaction. |
| TX_ID | bigint(20) | NO | The ID of the transaction. |
| LS_ID | bigint(20) | NO | The ID of the log stream. |
| PARTICIPANTS | varchar(1024) | NO | The list of participants. |
| CTX_CREATE_TIME | timestamp(6) | YES | The point in time when the context was created. |
| TX_EXPIRED_TIME | timestamp(6) | YES | The point in time when the transaction times out. |
| STATE | varchar(9) | NO | The context submission status. |
| ACTION | varchar(10) | NO | The last executed action. |
| PENDING_LOG_SIZE | bigint(20) | NO | The size of the data to persist. |
| FLUSHED_LOG_SIZE | bigint(20) | NO | The size of the persisted data. |
| ROLE | varchar(8) | NO | The role of the context. |
| COORD | bigint(20) | NO | The IS ID of the coordinator. This column takes effect only in the commit phase. |
| LAST_REQUEST_TIME | timestamp(6) | YES | The point in time when an external request is last received. |
| FORMATID | bigint(20) | NO | The format type of the transaction branch identifier (XID). |
| GLOBALID | varchar(257) | NO | The global identifier of the eXtended Architecture (XA) transaction. |
| BRANCHID | varchar(257) | NO | The branch qualifier of the XA transaction. |
Sample query
Query the participant information of active transactions on all OBServer nodes.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_TRANSACTION_PARTICIPANTS LIMIT 1\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1
SVR_IP: xx.xx.xx.xx
SVR_PORT: 2882
SESSION_ID: 3221637294
SCHEDULER_ADDR: "xx.xx.xx.xx:2882"
TX_TYPE: LOCAL
TX_ID: 4051827
LS_ID: 1
PARTICIPANTS: [{id:-1}]
CTX_CREATE_TIME: 2025-04-27 15:25:50.859591
TX_EXPIRED_TIME: 2025-04-27 15:26:20.859575
STATE: ACTIVE
ACTION: COMMIT
PENDING_LOG_SIZE: 0
FLUSHED_LOG_SIZE: 73
ROLE: LEADER
COORD: 1
LAST_REQUEST_TIME: 2025-04-27 15:25:50.859591
FORMATID: -1
GLOBALID: NULL
BRANCHID: NULL