V$OPEN_CURSOR

2025-11-14 07:33:33  Updated

Note

This view is available starting with V3.1.2.

Purpose

This view displays information about the current open session cursors.

Applicability

This view is available only in Oracle mode.

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 field is currently NULL.
HASH_VALUE NUMBER NO The SQL hash. This field 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 field is currently NULL.
CURSOR_TYPE VARCHAR2(30) NO The cursor type. Valid values:
  • OPEN: indicates the SQL statements that are open in all sessions.
  • SESSION CURSOR: indicates the session cursors that are open in all sessions.
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 value is 1.

Sample query

Query information about the open session cursors 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

Contact Us