Quantcast
OracleBrains.Com header image 2

How to find a trace file Oracle 11g

December 16th, 2007 by Rajender Singh · No Comments

Yesterday I was doing some r&d and tried to find trace file for my session.

After lot of trouble I was able to find them.

Last time its was a simple task, I just need to look at $ORACLE_BASE/SID/udump directory of the database server.

But now trace files are stored in the the trace directory under Automatic Diagnostic Repository (ADR) home.

To get the location of individual trace files we can use data dictionary views as follow:

To find the trace file for your current session:

SELECT value
FROM v$diag_info
WHERE name = ‘Default Trace File’;

This query will return the full path to the trace file.


To find all trace files for the current instance:

SELECT value
FROM v$diag_info
WHERE name = ‘Diag Trace’;

This query will return the full path to the ADR trace directory.

To determine the trace file for each Oracle Database process:

SELECT pid, program, tracefile
FROM v$process;

This query will return the full path to the trace file with its respective process id.


I hope this infomration will be useful to others.

Tags: Oracle Administration · Oracle Database

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment