advertisements
_____________________________________________________________________________________________________________________
Method 1.
Using alter session command
Example
ALTER SESSION SET sql_trace=TRUE; ALTER SESSION SET sql_trace=FALSE;
Example
SQL> ALTER SESSION SET sql_trace=TRUE; Session altered. SQL> ALTER SESSION SET sql_trace=FALSE; Session altered.
advertisements
Method 2.
Using DBMS_SESSION package
Method 3.
EXEC DBMS_SESSION.set_sql_trace(sql_trace => TRUE); EXEC DBMS_SESSION.set_sql_trace(sql_trace => FALSE); SQL> EXEC DBMS_SESSION.set_sql_trace(sql_trace => TRUE); PL/SQL procedure successfully completed. SQL> EXEC DBMS_SESSION.set_sql_trace(sql_trace => FALSE); PL/SQL procedure successfully completed.
Method 3.
Using Alter session set events command
ALTER SESSION SET EVENTS '10046 trace name context forever, level 8'; ALTER SESSION SET EVENTS '10046 trace name context off'; SQL> ALTER SESSION SET EVENTS '10046 trace name context forever, level 8'; Session altered. SQL> ALTER SESSION SET EVENTS '10046 trace name context off'; Session altered.
_____________________________________________________________________________________________________________________
0 comments:
Post a Comment