Note
This view is available starting with V3.1.2.
Overview
Displays information about session cursors that are in the open state on all nodes.
Applicability
This view is applicable only to OceanBase Database in Oracle-compatible mode.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(46) | NO | Server IP Address |
| SVR_PORT | NUMBER(38) | NO | Server Port Number |
| SADDR | VARCHAR2(8) | NO | Session Memory Address |
| SID | NUMBER | NO | Session ID |
| USER_NAME | VARCHAR2(30) | NO | Username |
| ADDRESS | VARCHAR2(8) | NO | SQL address, which uniquely identifies an SQL statement together with the SQL hash. Currently, this field is NULL. |
| HASH_VALUE | NUMBER | NO | SQL Hash. Currently, this field is NULL. |
| SQL_ID | VARCHAR2(32) | NO | SQL ID |
| SQL_TEXT | VARCHAR2(60) | NO | The first 60 string characters of the SQL text |
| LAST_SQL_ACTIVE_TIME | DATE | NO | Last Execution Time |
| SQL_EXEC_ID | NUMBER | NO | This field is currently null. |
| CURSOR_TYPE | VARCHAR2(30) | NO | Cursor type, which currently includes two states:
|
| CHILD_ADDRESS | VARCHAR2(30) | NO | This field is not supported. |
| CON_ID | NUMBER | NO | The ID of the container to which the data belongs. The current value is1 |
Sample query
Query the information about open session cursors on all nodes.
obclient[SYS]> SELECT * FROM SYS.GV$OPEN_CURSOR;
The query result is as follows:
+----------------+----------+----------+------------+-----------+---------+------------+----------------------------------+--------------------------------------------+----------------------+-------------+-------------+---------------+--------+
| SVR_IP | SVR_PORT | SADDR | SID | USER_NAME | ADDRESS | HASH_VALUE | SQL_ID | SQL_TEXT | LAST_SQL_ACTIVE_TIME | SQL_EXEC_ID | CURSOR_TYPE | CHILD_ADDRESS | CON_ID |
+----------------+----------+----------+------------+-----------+---------+------------+----------------------------------+--------------------------------------------+----------------------+-------------+-------------+---------------+--------+
| 172.xx.xxx.xxx | 2882 | dab241f0 | 3221681162 | SYS | NULL | NULL | 1253DFE0FC404832728BD3791DD83943 | select * from GV$OPEN_CURSOR | 07-MAY-25 | NULL | OPEN | NULL | 1 |
| 172.xx.xxx.xxx | 2882 | dab40b70 | 3221724339 | SYS | NULL | NULL | NULL | ALTER SYSTEM SET arbitration_timeout='30s' | 07-MAY-25 | NULL | OPEN | NULL | 1 |
| 172.xx.xxx.xxx | 2882 | 2a852b70 | 3221557889 | SYS | NULL | NULL | NULL | select * from GV$OB_GLOBAL_TRANSACTION | 07-MAY-25 | NULL | OPEN | NULL | 1 |
+----------------+----------+----------+------------+-----------+---------+------------+----------------------------------+--------------------------------------------+----------------------+-------------+-------------+---------------+--------+
3 rows in set
