Note
This view is available starting with V4.2.0.
Purpose
This view displays the locks held or requested on tables of the current user.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(46) | NO | The IP address of the OBServer node that holds or requests the lock. |
| SVR_PORT | NUMBER(38) | NO | The port number of the OBServer node that holds or requests the lock. |
| TENANT_ID | NUMBER(38) | NO | The ID of the tenant that holds or requests the lock. |
| TRANS_ID | NUMBER(38) | NO | The ID of the transaction that holds or requests the lock. |
| SESSION_ID | NUMBER(38) | NO | The ID of the session that holds or requests the lock
|
| TYPE | VARCHAR2(9) | NO | The lock type:
|
| ID1 | NUMBER | NO | The first lock identifier:
|
| ID2 | VARCHAR2(553) | NO | The second lock identifier:
|
| ID3 | varchar(512) | NO | The third lock identifier:
Note
|
| LMODE | VARCHAR2(8) | NO | The mode of the lock currently held:
|
| REQUEST | VARCHAR2(8) | NO | The mode of the lock currently requested:
|
| CTIME | NUMBER(38) | NO | The time for which the lock has been held or is being waited for, in microseconds |
| BLOCK | NUMBER | NO | Indicates whether the lock requested by the current transaction is held by another transaction:
|
Sample query
Query the locks held or requested on tables of the current user on the current OBServer node.
obclient [SYS]> SELECT * FROM SYS.V$OB_LOCKS;
The query result is as follows:
+----------------+----------+-----------+----------+------------+------+---------+------------+--------+-------+---------+-----------+-------+
| SVR_IP | SVR_PORT | TENANT_ID | TRANS_ID | SESSION_ID | TYPE | ID1 | ID2 | ID3 | LMODE | REQUEST | CTIME | BLOCK |
+----------------+----------+-----------+----------+------------+------+---------+------------+--------+-------+---------+-----------+-------+
| 11.xxx.xxx.xxx | 28825 | 1004 | 3966849 | 3221605368 | TM | 3966849 | 3221605368 | 500084 | X | NONE | 343458403 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1004 | 3966849 | 3221605368 | TM | 3966849 | 3221605368 | 200069 | X | NONE | 343441113 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1004 | 3966849 | 3221605368 | TM | 3966849 | 3221605368 | 200068 | X | NONE | 343441120 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1004 | 3966849 | 3221605368 | TM | 3966849 | 3221605368 | 200067 | X | NONE | 343441128 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1004 | 3966849 | 3221605368 | TM | 3966849 | 3221605368 | 200066 | X | NONE | 343441135 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1004 | 3966849 | 3221605368 | TM | 3966849 | 3221605368 | 200065 | X | NONE | 343441144 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1004 | 3966849 | 3221605368 | TM | 3966849 | 3221605368 | 200064 | X | NONE | 343441152 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1004 | 3966849 | 3221605368 | TM | 3966849 | 3221605368 | 200063 | X | NONE | 343441159 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1004 | 3966849 | 3221605368 | TM | 3966849 | 3221605368 | 200062 | X | NONE | 343441187 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1004 | 3966849 | 3221605368 | TM | 3966849 | 3221605368 | 200061 | X | NONE | 343441200 | 0 |
+----------------+----------+-----------+----------+------------+------+---------+------------+--------+-------+---------+-----------+-------+
10 rows in set
References
For more information about table locks, see Lock a table.
