Oracle 视图 V$DIAG_SQL_TRACE_RECORDS 官方解释,作用,如何使用详细说明
本站中文解释
V$DIAG_SQL_TRACE_RECORDS视图提供了accessed_instance_id列。这个列报告了每一个sql自上一次性能查询以来,在活动会话中执行的次数。它可以让DBA的查询结果自动存档起来,大大增加Oracle数据库支持和调试能力。同时还可以用来收集每一条SQL语句执行的统计信息,从而可以了解SQL语句执行的次数,平均时长等。
使用方法:
1.可以使用SELECT * FROM V$DIAG_SQL_TRACE_RECORDS;来查看当前会话的SQL跟踪记录。
2.可以使用SELECT * FROM V$DIAG_SQL_TRACE_RECORDS WHERE accessed_instance_id = ;来查看某一特定实例的SQL跟踪记录。
官方英文解释
V$DIAG_SQL_TRACE_RECORDS
contains all SQL_TRACE data that is present in the trace files that are part of the current Automatic Diagnostic Repository (ADR). This view also supports GV$ global views.
Column | Datatype | Description |
---|---|---|
|
|
Path to current ADR home |
|
|
Displays the name of the process trace file |
|
|
Displays the level of the trace record |
|
|
Displays the top parent level of the trace record |
|
|
Displays the type of the trace record. Possible values include:
|
|
|
Displays the timestamp when the trace record was produced |
|
|
Displays the trace record payload (contents) |
|
|
Displays the section ID / dump ID of the trace record |
|
|
Displays the section name / dump name of the trace record |
|
|
Displays the component name which produced the trace record |
|
|
Displays the operation name which produced the trace record |
|
|
Displays the name of the code file where this trace record is produced |
|
|
Displays the function which produced this trace record |
|
|
Displays the line number in the code file which produced this trace record |
|
|
Displays the operating system thread ID of the process which produced the trace record |
|
|
Displays the user session ID which generated the trace record |
|
|
Displays the user session serial number which produced the trace record |
|
|
Displays the trace record security label classification. Possible values:
|
|
|
Displays the container unique ID where the trace record was produced |
|
|
Displays the container name where the trace record was produced |
|
|
The ID of the container to which the data pertains. Possible values include:
|