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

本站中文解释

ALL_SQLSET_BINDS视图包含了该用户执行的SQL语句中所有的变量绑定信息。这种绑定的信息也叫参数绑定,也叫变量绑定。参数绑定是指在一段固定的SQL语句中指定变量并在后续执行该语句时,可以动态地改变变量值,而数据库不需要重新编译该语句。

任何用户都可以使用ALL_SQLSET_BINDS视图检查其已经执行的SQL语句的参数绑定信息。

要使用ALL_SQLSET_BINDS视图,需要执行SELECT语句,在SELECT语句中指定被查看的SQL执行ID和包含变量绑定信息的SQL文本。FROM子句引用ALL_SQLSET_BINDS视图来查看用户执行的SQL语句的变量绑定信息:

SELECT *
FROM all_sqlsets_binds
WHERE sql_exec_id = ‘1’
AND sql_text = ‘SELECT * FROM emp WHERE empno=:empno’;

官方英文解释

ALL_SQLSET_BINDS displays the bind values associated with all SQL tuning sets accessible to the current user.

Related Views

  • DBA_SQLSET_BINDS displays the bind values associated with all SQL tuning sets in the database.

  • USER_SQLSET_BINDS displays the bind values associated with the SQL tuning sets owned by the current user. This view does not display the SQLSET_OWNER column.

Column Datatype NULL Description

SQLSET_NAME

VARCHAR2(128)

Name of the SQL tuning set for the statement

SQLSET_OWNER

VARCHAR2(128)

User name of the SQL tuning set owner

SQLSET_ID

NUMBER

ID of the SQL tuning set for the statement

CON_DBID

NUMBER

The database ID of the PDB

SQL_ID

VARCHAR2(13)

SQL identifier of the parent cursor in the library cache

FORCE_MATCHING_SIGNATURE

NUMBER

The signature used when the CURSOR_SHARING parameter is set to FORCE

PLAN_HASH_VALUE

NUMBER

Numerical representation of the SQL plan for the cursor. Comparing one PLAN_HASH_VALUE to another easily identifies whether or not two plans are the same (rather than comparing the two plans line-by-line).

POSITION

NUMBER

Bind position

VALUE

ANYDATA

Bind value. This column is NULL for PL/SQL bind types.

CAPTURED

CHAR(1)

Binds captured

SQL_SEQ

NUMBER

SQL sequence

See Also:

  • “DBA_SQLSET_BINDS”

  • “USER_SQLSET_BINDS”


数据运维技术 » Oracle 视图 ALL_SQLSET_BINDS 官方解释,作用,如何使用详细说明