Sunday, June 21, 2009

Oracle: tracing a session

Method A (for your own session):

SQL> ALTER SESSION SET SQL_TRACE={True|False};


Method B (for your own session):

SQL> EXECUTE dbms_session.set_sql_trace ({True|False});


Method C (for super user to trace other sessions):

SQL> EXECUTE dbms_system.set_sql_trace_in_session (sid,serial#,{True|False});