欢迎光临
我们一直在努力

Oracle 视图 V$OPEN_CURSOR 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图V$OPEN_CURSOR是ORACLE预定义的视图,用于显示数据库中当前打开的游标。它显示了每个当前活动游标的信息。

该视图可用于查看SQL和PL/SQL程序在当前会话中打开的游标数量,以及每个游标的信息,包括扒开的SQL类型、子类型、关联的会话ID、对应的进程ID和会话的操作时间。

这个视图可以使用以下语法进行查询:
SELECT * FROM V$OPEN_CURSOR;
通过这种方式,系统管理员可以查看当前数据库会话中打开的游标。这些信息可以帮助系统管理员识别和分析可能出现性能问题的sql和pl/sql语句,以及性能优化的空间。

官方英文解释

V$OPEN_CURSOR lists cursors that each user session currently has opened and parsed, or cached.

Column Datatype Description

SADDR

RAW(4 | 8)

Session address

SID

NUMBER

Session identifier

USER_NAME

VARCHAR2(128)

User that is logged in to the session

ADDRESS

RAW(4 | 8)

Used with HASH_VALUE to uniquely identify the SQL statement being executed in the session

HASH_VALUE

NUMBER

Used with ADDRESS to uniquely identify the SQL statement being executed in the session

SQL_ID

VARCHAR2(13)

SQL identifier of the SQL statement being executed in the session

SQL_TEXT

VARCHAR2(60)

First 60 characters of the SQL statement that is parsed into the open cursor

LAST_SQL_ACTIVE_TIME

DATE

Time when this cursor was last executed

SQL_EXEC_ID

NUMBER

If the open cursor is executing, then the SQL execution identifier for that execution (see V$SQL_MONITOR)

CURSOR_TYPE

VARCHAR2(64)

Type of cursor:

  • OPEN PL/SQL – Open PL/SQL cursors

  • OPEN – Other open cursors

  • SESSION CURSOR CACHED – Cursors cached in the generic session cursor cache

  • OPEN-RECURSIVE – Open recursive cursors

  • DICTIONARY LOOKUP CURSOR CACHED – Cursors cached in the dictionary lookup cursor cache

  • BUNDLE DICTIONARY LOOKUP CACHED – Cursors cached in the bundled dictionary lookup cursor cache

  • JAVA NAME TRANSLATION CURSOR CACHED – Cursors cached in the Java name translation cursor cache

  • REPLICATION TRIGGER CURSOR CACHED – Cursors cached in the replication trigger cursor cache

  • CONSTRAINTS CURSOR CACHED – Cursors cached in the constraints cursor cache

  • PL/SQL CURSOR CACHED – Cursors cached in the PL/SQL cursor cache

CHILD_ADDRESS

RAW(4 | 8)

Address of the child cursor

CON_ID

NUMBER

The ID of the container to which the data pertains. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。