To enable tracing for a specific session ID and serial number, determine the values for the session to trace:
SELECT SID, SERIAL#, USERNAME FROM V$SESSION;
SID SERIAL# USERNAME
---------- ---------- ------------------------------
120 23 ERP
To trace particular session:
EXEC dbms_monitor.SESSION_TRACE_ENABLE(session_id=> 120, serial_num=>23, waits=>TRUE, binds=>FALSE);
EXEC dbms_monitor.SESSION_TRACE_DISABLE(session_id =>120, serial_num=>23);
To trace all sessions in the database:
EXEC dbms_monitor.DATABASE_TRACE_ENABLE(TRUE,TRUE);
EXEC dbms_monitor.DATABASE_TRACE_DISABLE();
--AsifKhan
No comments:
Post a Comment