This content has been marked as final. Show 3 replies
1 alter session is alter session, so pertains to the current session only. Obviously 'alter system set events=' would hit everyone.
Your session will open a trace file as soon as it hits ora-1000. The other session will not open a trace file as you didn't enable the event on an instance-wide basis.
2 Usually the depth of the stack, but there are different numbers for every level. IIRC 3 also dumps the statement invoking the error.
3 using dbms_system.read_ev, you can just loop from 1 to 20000 and call read_ev for everyone of them.
the command is a bit strange. Usually they end with ',context forever' and ',context off' switches them off. When you set them on session level you don't need to worry.
Please note open_cursors is a session limit, it is not a system limit.
5 just use grep or find.
Senior Oracle DBA
Thanks for all the answers.
What am I doing bad? I have tried ti find out what traces are enabled, and there seems to be none.
But, otherwise, there are trc files which have been modfiied recently? I seems as if this procedure can't detect all the tracles enabled:
SQL> r 1 DECLARE 2 OUT BINARY_INTEGER; 3 BEGIN 4 DBMS_OUTPUT.put_line ('Init'); 5 6 FOR i IN 1 .. 20000 7 LOOP 8 SYS.DBMS_SYSTEM.read_ev (i, OUT); 9 10 IF (OUT <> 0) 11 THEN 12 DBMS_OUTPUT.put_line ('i: ' || i || '; ' || OUT); 13 END IF; 14 END LOOP; 15 16 DBMS_OUTPUT.put_line ('End'); 17* END; Init End
(oracle)mano1re(principal)$ ls -lt *.trc | more -rw-r----- 1 oracle dba 348294 jul 14 18:35 reflex_ora_11706.trc -rw-r----- 1 oracle dba 997820 jul 9 16:32 reflex_ora_15766.trc -rw-r----- 1 oracle dba 399571 jul 3 15:23 reflex_ora_25955.trc -rw-r----- 1 oracle dba 1637069 jun 9 15:34 reflex_ora_19742.trc PL/SQL procedure successfully completed.