DBMS_SESSION包跟踪10046
注意:DBMS_SESSION包:只能跟踪当前会话,不能指定会话
DBMS_SESSION.SET_SQL_TRACE=ALTER SESSION SET SQL_TRACE; =ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 1';
EXEC DBMS_SESSION.SET_SQL_TRACE(TRUE); SQL> 执行SQL EXEC DBMS_SESSION.SET_SQL_TRACE(FALSE);
DBMS_SESSION.SESSION_TRACE_ENABLE包=ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 12';
EXEC DBMS_SESSION.SESSION_TRACE_ENABLE(WAITS=>TRUE,BINDS=>TRUE); SQL> 执行SQL EXEC DBMS_SESSION.SESSION_TRACE_DISABLE();