ITPub博客

首页 > 数据库 > Oracle > 从v$diag_info定位trace file

从v$diag_info定位trace file

Oracle 作者:pentium 时间:2018-12-26 10:26:18 0 删除 编辑

Oracle Support note  Interpreting Raw SQL_TRACE output  (39817.1).  TKPROF

As of version 11.1, it ’ s much easier to query either the v$diag_info or v$process views, as shown in the following examples:

SQL> SELECT value

2 FROM v$diag_info

3 WHERE name = 'Default Trace File';

VALUE

--------------------------------------------------------------------

/u00/app/oracle/diag/rdbms/dba111/DBA111/trace/DBA111_ora_23731.trc

SQL> SELECT p.tracefile

2 FROM v$process p, v$session s

3 WHERE p.addr = s.paddr

4 AND s.sid = sys_context('userenv','sid');

TRACEFILE

--------------------------------------------------------------------

/u00/app/oracle/diag/rdbms/dba111/DBA111/trace/DBA111_ora_23731.trc

Note that the v$diag_info view provides information for the current session only.




来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/14377/viewspace-2286456/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-09-30

  • 博文量
    191
  • 访问量
    327287