Oracle trace logging

From WickyWiki
Revision as of 07:26, 5 July 2013 by Admin (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Oracle trace is detailled logging on the server that you may need to analyse certain problems. Remember to disable trace as it uses considerable resources.

Source:

To enable trace for one session, after the session ends this will be disabled:

alter session set sql_trace=true;

To enable trace for the complete database:

alter system set sql_trace=true scope=memory;

Don't forget to disable it when you are done:

alter system set sql_trace=false scope=memory;

Tracing will create a .trc file in the user log directory, usually under:

  • ORACLE_HOME/admin/oracle_instance_name/udump

You can convert the trace file to a more readable form by with:

tkprof trace_file_name output_file_name