SYS@orclasm > oradebug setmypid
SYS@orclasm > oradebug eventdump system
SYS@orclasm > oradebug eventdump session
LHR@orclasm > ALTER SESSION SET EVENTS '10046 trace name context forever,level 12';
Session altered.
LHR@orclasm > ALTER SESSION SET EVENTS '10053 trace name context forever, level 1';
Session altered.
LHR@orclasm > ALTER SESSION SET EVENTS '10710 trace name context forever, level 1';
Session altered.
LHR@orclasm > alter session set events '10510 trace name context forever,level 1';
Session altered.
LHR@orclasm > set serveroutput on size 1000000
LHR@orclasm > DECLARE
2 EVENT_LEVEL NUMBER;
3 BEGIN
4 FOR I IN 10000 .. 99999 LOOP
5 SYS.DBMS_SYSTEM.READ_EV(I, EVENT_LEVEL);
IF (EVENT_LEVEL > 0) THEN
7 DBMS_OUTPUT.PUT_LINE('Event ' || TO_CHAR(I) || ' set at level ' ||
8 TO_CHAR(EVENT_LEVEL));
9 END IF;
10 END LOOP;
11 END;
12 /
Event 10510 set at level 1
Event 10710 set at level 1
PL/SQL procedure successfully completed.
LHR@orclasm >
LHR@orclasm > oradebug SETMYPID
ORA-01031: insufficient privileges
LHR@orclasm >
LHR@orclasm >
LHR@orclasm > conn / as sysdba
Connected.
SYS@orclasm > oradebug SETMYPID
Statement processed.
SYS@orclasm > oradebug eventdump session
Statement processed.
SYS@orclasm > oradebug eventdump system
Statement processed.
SYS@orclasm > ALTER SESSION SET EVENTS '10046 trace name context forever,level 12';
Session altered.
SYS@orclasm > oradebug eventdump session
sql_trace level=12
SYS@orclasm > oradebug eventdump system
Statement processed.
SYS@orclasm > ALTER SESSION SET EVENTS '10053 trace name context forever, level 1';
Session altered.
SYS@orclasm > oradebug eventdump session
trace [RDBMS.SQL_OPTIMIZER]
trace [RDBMS.SQL_Transform]
trace [RDBMS.SQL_MVRW]
trace [RDBMS.SQL_VMerge]
trace [RDBMS.SQL_Virtual]
trace [RDBMS.SQL_APA]
trace [RDBMS.SQL_Costing]
trace [RDBMS.SQL_Parallel_Optimization]
trace [RDBMS.SQL_Plan_Management]
sql_trace level=12
SYS@orclasm > oradebug eventdump system
Statement processed.
SYS@orclasm > ALTER SESSION SET EVENTS '10710 trace name context forever, level 1';
Session altered.
SYS@orclasm > oradebug eventdump session
10710 trace name context forever, level 1
trace [RDBMS.SQL_OPTIMIZER]
trace [RDBMS.SQL_Transform]
trace [RDBMS.SQL_MVRW]
trace [RDBMS.SQL_VMerge]
trace [RDBMS.SQL_Virtual]
trace [RDBMS.SQL_APA]
trace [RDBMS.SQL_Costing]
trace [RDBMS.SQL_Parallel_Optimization]
trace [RDBMS.SQL_Plan_Management]
sql_trace level=12
SYS@orclasm > oradebug eventdump system
Statement processed.
SYS@orclasm > alter system set events='1438 trace name errorstack forever,level 3';
System altered.
SYS@orclasm > oradebug eventdump session
1438 trace name errorstack forever,level 3
10710 trace name context forever, level 1
trace [RDBMS.SQL_OPTIMIZER]
trace [RDBMS.SQL_Transform]
trace [RDBMS.SQL_MVRW]
trace [RDBMS.SQL_VMerge]
trace [RDBMS.SQL_Virtual]
trace [RDBMS.SQL_APA]
trace [RDBMS.SQL_Costing]
trace [RDBMS.SQL_Parallel_Optimization]
trace [RDBMS.SQL_Plan_Management]
sql_trace level=12
SYS@orclasm > oradebug eventdump system
1438 trace name errorstack forever,level 3
SYS@orclasm > alter system set events='1438 trace name errorstack off';
System altered.
SYS@orclasm >