Wednesday, July 29, 2009

Tracing other's session in 10g

To trace the other user's session in Oracle 10g,

Step 1: Set the init parameter.

SQL> Alter system set TIMED_STATISTICS = TRUE;
SQL> Alter system set MAX_DUMP_SIZE = UNLIMITED;
SQL> Alter system set TRACEFILE_IDENTIFIER = ‘mytrace’;

Step 2: Enable Tracing

SQL> Exec DBMS_MONITOR.session_trace_enable(149,3643, TRUE, TRUE);
Where
1st Parameter: Session ID. (null means current session’s ID)
2nd Parameter: Serial # (null means current session’s serial#)
3rd Parameter: Trace Waits (Default True)
4th Parameter: Bind Variables (Default False)

Step 3: Disable Tracing

SQL> Exec DBMS_MONITOR.SESSION_TRACE_DISABLE(149,3643);

Thanks

1 comment:

sap support packs said...

We have already learned how to trace your own session in your previous posts. This post describe how to trace others session in 10g. The steps are similar to those were for tracing own session with slight difference. You can try it.

Followers

Powered By Blogger
 

Oracle Database Administration. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com