DBMS_SESSION.SET_SQL_TRACE : dbms_session « System Packages « Oracle PL/SQL Tutorial






SQL>
SQL> CREATE OR REPLACE PROCEDURE core_process IS
  2  BEGIN
  3     IF USER = 'PLSQL_USER' THEN
  4        DBMS_SESSION.SET_SQL_TRACE(TRUE);
  5        DBMS_OUTPUT.PUT_LINE('Tracing is turned on...');
  6     END IF;
  7     DBMS_SESSION.SET_SQL_TRACE(FALSE);
  8     DBMS_OUTPUT.PUT_LINE('Tracing is turned off.');
  9  END;
 10  /

Procedure created.

SQL>
SQL>








31.24.dbms_session
31.24.1.dbms_session.set_context
31.24.2.DBMS_SESSION.IS_ROLE_ENABLED
31.24.3.DBMS_SESSION.SET_SQL_TRACE
31.24.4.Use dbms_session.AppCtxTabTyp and dbms_session.list_context to display context