Note
This view is available starting with V3.1.2.
Purpose
This view displays information about the session cursors that are in the open state.
Applicability
This view is available only in Oracle mode of OceanBase Database.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(46) | NO | The IP address of the server. |
| SVR_PORT | NUMBER(38) | NO | The port number of the server. |
| SADDR | VARCHAR2(8) | NO | The memory address of the session. |
| SID | NUMBER | NO | The session ID. |
| USER_NAME | VARCHAR2(30) | NO | The username. |
| ADDRESS | VARCHAR2(8) | NO | The SQL address. Together with the SQL hash, it uniquely identifies an SQL statement. This column is currently NULL. |
| HASH_VALUE | NUMBER | NO | The SQL hash. This column is currently NULL. |
| SQL_ID | VARCHAR2(32) | NO | The SQL ID. |
| SQL_TEXT | VARCHAR2(60) | NO | The first 60 characters of the SQL text. |
| LAST_SQL_ACTIVE_TIME | DATE | NO | The time when the SQL statement was last executed. |
| SQL_EXEC_ID | NUMBER | NO | This column is currently NULL. |
| CURSOR_TYPE | VARCHAR2(30) | NO | The cursor type. Valid values:
|
| CHILD_ADDRESS | VARCHAR2(30) | NO | This column is not supported. |
| CON_ID | NUMBER | NO | The ID of the container to which the data belongs. The current value is 1. |
Sample query
Query information about the session cursors that are in the open state on the current node.
obclient[SYS]> SELECT * FROM SYS.V$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 | 9B8880F5228B9CE6E9282AB83F35E34A | SELECT * FROM SYS.V$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
