Oracle 视图 DBA_HIST_SQLBIND 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图DBA_HIST_SQLBIND是Oracle数据库中的历史化系统视图,它可以把应用程序执行的SQL语句及绑定变量信息记录在表中,供问题分析查询。
DBA_HIST_SQLBIND视图提供历史信息,可以查询SQL语句的绑定变量信息。主要信息有:SQL_ID,需要绑定的变量数量,绑定变量的数据类型,值的字节和字符串数,值的大小,命名参数标识等。
使用Oracle视图DBA_HIST_SQLBIND可以实现如下查询功能:
1. 查询已执行的SQL语句及绑定变量的相关信息:可以使用SELECT SQL_ID,绑定变量名称,绑定变量值等内容查询已执行的SQL语句及其执行过程中绑定变量的相关信息。
2. 解决数据库问题:使用DBA_HIST_SQLBIND视图查询应用程序执行的SQL语句及绑定变量的值,从而可以对具体问题进行排查,从而解决应用程序运行中出现的数据库问题。
官方英文解释
DBA_HIST_SQLBIND
displays historical information on bind variables used by SQL cursors.
This view contains snapshots of V$SQL_BIND_CAPTURE
.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
| Unique snapshot ID |
|
|
| Database ID for the snapshot |
|
|
| Instance number 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 | |
|
| Indicates whether the bind value was captured ( | |
|
| Date when the bind value was captured. Bind values are captured when SQL statements are executed. To limit the overhead, binds are captured at most every 15 minutes for a given cursor. | |
|
| Value of the bind represented as a string | |
|
| Value of the bind represented using the self-descriptive | |
|
| The database ID of the PDB for the sampled session | |
|
| The ID of the container that
|
See Also:
“V$SQL_BIND_CAPTURE”
编辑:一起学习网
标签:绑定,变量,视图,语句,应用程序