To trace your own session follow the steps below,
Step 1: Set the init parameters
SQL> Alter session set TIMED_STATISTICS = TRUE;
SQL> Alter session set MAX_DUMP_SIZE = UNLIMITED;
SQL> Alter session set TRACEFILE_IDENTIFIER = ‘mytrace’;
Timed_statistics – Allows tracing to occur on the system.
Max_dump_size – Maximum size of the trace file in OS level blocks.
Tracefile_identifier - To identify the trace file generated for a particular session in the udump.
Step 2: Enable the tracing
SQL> Alter session set SQL_TRACE='TRUE';
or in 10g
SQL> Execute DBMS_MONITOR.SESSION_TRACE_ENABLE(NULL,NULL, TRUE, TRUE);
Note: In Oracle 10g SQL_TRACE parameter has been deprecated.
Step 3: Disable the Tracing
SQL> Alter session set SQL_TRACE= False;
Or
SQL> Execute DBMS_MONITOR.SESSION_TRACE_DISABLE;
Or
SQL> Exit;
Thanks
Wednesday, July 29, 2009
Subscribe to:
Post Comments (Atom)
1 comment:
This post tells how to trace your own. The steps given in this post to do so are very simple and easy. You just need to follow these steps then you will be able to trace your session. Try to implement these steps and see the result. This is new thing that I learned.
Post a Comment