Home » Archive

Articles tagged with: Oracle Enable tracing

ORA-HOWTO, Oracle Code »

[23 Nov 2009 | No Comment | 560 views]

1. Enable tracing and set the maxiumum dump file size to unlimited:

SQL> ALTER SYSTEM SET timed_statistics = true;
SQL> ALTER SYSTEM SET max_dump_file_size = unlimited;

2. find sid and serial for session you want to trace:

SQL> SELECT sid, serial#, username from v$session;

3. start tracing:

SQL> execute dbms_system.set_sql_trace_in_session(sid, serial, true);

Now, all query and operation from the session are traced.
4. stop tracing:

SQL> execute dbms_system.set_sql_trace_in_session(sid, serial, false);

Read the trace file:
You can find trace files in user dump file destination (UDUMP):

SQL> SHOW parameter user_dump_dest
 
NAME …