alter session set events. This statement sets a diagnostic event. The following snippet dumps an Index Tree.
SQL_Plan_Management SQL Plan Managment (kkopm) MPGE MPGE (qksctx). SQL> alter session set events 'trace [SQL_Compiler.*]'
Basically the question was that while ALTER SESSION SET EVENTS ‘10046 … ‘ enabled the SQL Trace for the current session immediately, ALTER SYSTEM on the other hand didn’t seem to do anything at all for other sessions in the instance.
where Level is one of 0,1,4,8,12 to trace your session. But I can't found some explanations for ALTER SESSION SET EVENTS '...' in Oracle documentation. Who can me point some explanation to this command in Oracle docs ?
ALTER SESSION SET sql_trace = FALSE; Event Tracing Examples. Active Session History.
SQL> ALTER SESSION SET EVENTS '10046 trace name context forever, level 8'; SQL> ALTER SESSION SET
You might want to steal a look at the other session especially for the parameters altered by the session and the diagnostics events set by the the session. As far as I know, there are no official ways(dynamic performace views) to get those values.
SQL> alter session set events '10046 trace name context forever, level 12'; SQL> @check_param Event 10015 set at level 12 Event 10046 set at level 12 PL/SQL procedure successfully completed.
Unless you already know what the event does, setting it is probably a REALLY bad idea. Of course, what I like to do is create a small throwaway database.
must: Set SEQ to ZERO. Set the INCSEQ at the end of the block to match. You can set event numbers 10210, 10211, and 10212 to check blocks.