Thursday, November 15, 2012

Dealing With Oracle Traces

This article using Oracle Database 11g , I will post for 10g Later .

How Could I change name for Oracle Trace :

alter session set tracefile_identifier = 'some_id';

    SQL> alter session set tracefile_identifier = 'osama';

    Session altered.

    SQL> oradebug tracefile_name

    /u01/app/oracle/admin/orcl/udump/orcl_ora_6207_osama.trc

maximum size of Oracle Trace File

-By Set max_dump_file_size parameter
- alter session set max_dump_file_size = unlimited;

Finding Oracle Trace File for current session :

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

Finding Oracle Trace File for Current Database Process

     SELECT pid, program, tracefile
    FROM v$process;

To find all trace files for the current instance:

     SELECT VALUE FROM V$DIAG_INFO WHERE NAME = 'Diag Trace';

and you could use ADRCI features.

Thank you
Osama mustafa

1 comment: