Oracle 视图 DBA_HIST_SQL_BIND_METADATA 官方解释,作用,如何使用详细说明
本站中文解释
视图
Oracle视图DBA_HIST_SQL_BIND_METADATA用于查看历史绑定变量元数据信息。它显示所有捕获的SQL单元和其绑定变量的历史记录,并且只在使用Automatic SQL Tuning或SQL Access Advisor时可用。
使用此视图,你可以:
* 通过SQL_ID检索特定SQL语句的历史绑定变量元数据记录。
* 查看特定SQL语句的历史绑定变量的值
* 查看某些SQL的统计信息,如每个SQL的执行次数以及错误数。
使用该视图的示例:
在下面的查询中,将搜索过去一小时内执行过的特定SQL语句的最新绑定值:
SELECT SQL_ID, BIND_VALUE, EXECUTIONS, ERRORS
FROM DBA_HIST_SQL_BIND_METADATA
WHERE SQL_ID = ‘c2vcffd6f22b6’
AND BIND_TIMESTAMP >= SYSDATE – 1/24;
官方英文解释
DBA_HIST_SQL_BIND_METADATA
displays historical information on metadata for bind variables used by SQL cursors.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
|
Database ID for the snapshot |
|
|
|
SQL identifier of the parent cursor in the library cache |
|
|
Name of the bind variable |
|
|
|
|
Position of the bind variable in the SQL statement |
|
|
If the binding is performed by name and the bind variable is duplicated, then this column gives the position of the primary bind variable |
|
|
|
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. |
|
|
|
Textual representation of the bind data type. Beginning in Oracle Database 12c, a text representation of a PL/SQL-only data type can appear in this column. If the actual data type is a PL/SQL sub type, the name of the data type, not the sub type will be displayed. |
|
|
|
National character set identifier |
|
|
|
Precision (for numeric binds) |
|
|
|
Scale (for numeric binds) |
|
|
|
Maximum bind length |
|
|
|
The database ID of the PDB for the sampled session |
|
|
|
The ID of the container that
|