Oracle 视图 V$DIAG_SESS_OPT_TRACE_RECORDS 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图V$DIAG_SESS_OPT_TRACE_RECORDS用于查看当前会话的选项跟踪记录。它展示了与SESSION_TRACING_LEVEL设置有关的会话信息。这个视图包括以下信息:
1. SESSION_TRACING_LEVEL:会话跟踪级别,有OFF,LOW,MEDIUM,HIGH四种。
2. OPT_TRACE_START_TIMESTAMP:选项跟踪开始的时间戳。
3. OPT_TRACE_DURATION:前一级别选项跟踪持续的时间。
4. OPT_TRACE_FILENAME:保存有关选项跟踪数据的文件的名称。
5. OPT_TRACE_REC_COUNT:FIRED的跟踪记录数。
使用V$DIAG_SESS_OPT_TRACE_RECORDS视图时,需要根据需求使用一些过滤条件,如会话ID,用户名等,然后就可以查询出某一会话的相关选项跟踪信息了。例如:
SELECT SESSION_TRACING_LEVEL, OPT_TRACE_START_TIMESTAMP, OPT_TRACE_FILENAME
FROM V$DIAG_SESS_OPT_TRACE_RECORDS
WHERE SESSION_ID=’&your_session_id’;
以上查询语句就可以查询出指定会话ID所对应的跟踪级别、开始跟踪时间戳以及保存跟踪信息的文件名称。
官方英文解释
V$DIAG_SESS_OPT_TRACE_RECORDS
contains all optimizer trace event data that is present in the trace files for the current user session that is part of the current Automatic Diagnostic Repository (ADR).
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:
|