Oracle 视图 V$SQL_BIND_METADATA 官方解释,作用,如何使用详细说明
本站中文解释
V$SQL_BIND_METADATA 是 Oracle 中的动态视图,它查询可重用语句的绑定信息。它包括变量名、变量类型、变量值的描述性属性以及与此语句关联的表和列的信息。SQL 引擎使用这些属性来收集优化信息。
使用V$SQL_BIND_METADATA视图获取SQL语句的绑定信息,要做到这一点,请确保SQL_ID字段已被正确填充,以便根据SQL_TEXT字段重新构造引用语句并将绑定变量值传递给语句的实例。可以使用以下SQL查询V$SQL_BIND_METADATA:
SELECT *
FROM V$SQL_BIND_METADATA
WHERE SQL_ID = :sql_id;
官方英文解释
V$SQL_BIND_METADATA
describes metadata related to bind variables.
V$SQL_BIND_METADATA
describes, for each distinct bind variable in each cursor owned by the session querying this view:
-
Bind metadata provided by the client, if the bind variable is user defined
-
Metadata based on the underlying literal, if the
CURSOR_SHARING
parameter is set toFORCE
and the bind variable is system-generated.
Column | Datatype | Description |
---|---|---|
|
|
Memory address of the child cursor that owns this bind variable |
|
|
Bind position |
|
|
Internal identifier for the bind data type. Beginning in Oracle Database 12c, a number representing a PL/SQL data type can appear in this column. |
|
|
Maximum length of the bind value |
|
|
Maximum number of array elements (for array binds only) |
|
|
User-defined or system-generated bind variable name (if used) |
|
|
The ID of the container to which the data pertains. Possible values include:
|
See Also:
“CURSOR_SHARING”