從v$diag_info定位trace file

pentium發表於2018-12-26

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部落格 ” ,連結:http://blog.itpub.net/14377/viewspace-2286456/,如需轉載,請註明出處,否則將追究法律責任。

相關文章