Monday, January 23, 2012

Oracle Trace File Path



If you have enabled the TRACE for a concurrent program, and wants know the file location to check the file.


Here it is.. Below query helps you to get the TRACE file path of your instance.


************************************************************************************************************


SELECT      u_dump.VALUE
         || '/'
         || db_name.VALUE
         || '_ora_'
         || v$process.spid
         || NVL2 (v$process.traceid, '_' || v$process.traceid, NULL)
         || '.trc'
            "Trace File"
  FROM      v$parameter u_dump
            CROSS JOIN
            v$parameter db_name
            CROSS JOIN
            v$process
            JOIN
            v$session
            ON v$process.addr = v$session.paddr
 WHERE       u_dump.name = 'user_dump_dest'
         AND db_name.name = 'db_name'
         AND v$session.audsid = SYS_CONTEXT ('userenv', 'sessionid');
************************************************************************************************************


Let me know if any questions. ..


Thanks.. .




No comments:

Post a Comment