Oracle PL/SQL/System Packages/DBMS TRACE
DBMS_TRACE.PLSQL_TRACE_VERSION
SQL>
SQL> set serveroutput on
SQL>
SQL> DECLARE
2 v_MajorVersion BINARY_INTEGER;
3 v_MinorVersion BINARY_INTEGER;
4 BEGIN
5 DBMS_TRACE.PLSQL_TRACE_VERSION(v_MajorVersion, v_MinorVersion);
6 DBMS_OUTPUT.PUT_LINE("Trace major version: " || v_MajorVersion);
7 DBMS_OUTPUT.PUT_LINE("Trace minor version: " || v_MinorVersion);
8 END;
9 /
Trace major version: 1
Trace minor version: 0
PL/SQL procedure successfully completed.
SQL>
SQL>
Enable tracing of all calls and all exceptions.
SQL> BEGIN
2 DBMS_TRACE.SET_PLSQL_TRACE(
3 DBMS_TRACE.TRACE_ALL_CALLS +
4 DBMS_TRACE.TRACE_ALL_EXCEPTIONS);
5 END;
6 /
PL/SQL procedure successfully completed.
SQL>
SQL>
SQL>