Oracle Diagnostic Events Part 3
This is the 3th blog about Oracle events.. So many things to cover..
Let me start with this giant command:
SQL> alter session set events ’10046 trace name context level 12, type decr, lifetime 1, after 5 times’;
Session altered.
Many combinations in one command..
All these commands are self explanatory ( tried them anyway and see for yourself )
These are different options that you can use:immediate, forever, name context, name all,life <number> , lifetime,after time, after occurences, type incr, type increment ,type decr, type decrement, type constant, type const , off
Examples:
NAME CONTEXT
NAME ALL
SQL> alter session set events ’10046 trace name context level 12′;
Session altered.
SQL> alter session set events ’10046 trace name all’;
Session altered.
IMMEDIATE
FOREVER
SQL> alter session set events ’10046 trace name context level 12, forever’;
Session altered.
LIFE < number>
LIFETIME
AFTER < number > TIMES
AFTER < number > OCCURENCES
SQL> alter session set events ’10046 trace name context level 12, life 10′;
Session altered.
alter session set events ’10046 trace name context level 12, lifetime 10000, after 500 times’;
Session altered.
alter session set events ’10046 trace name context level 12, lifetime 10000, after 500 occurences’;
Session altered.
TYPE DECR
TYPE INCREMENT
TYPE DECREMENT
TYPE CONST
TYPE CONSTANT
SQL> alter session set events ’10046 trace name context level 12, type incr’;
Session altered.
SQL> alter session set events ’10046 trace name context level 12, type decr’;
Session altered.
SQL> alter session set events ’10046 trace name context level 12, type constant’;
Session altered.
SQL> alter session set events ’10046 trace name context level 12, type const’;
OFF
SQL> alter session set events ’10046 trace name context level 12, off’;
Session altered.
Here is event syntax again .In addition to these options you can also use charachters like (, ), [ , ] . * etc…
<event_spec> ::= ‘<event_id> [<event_scope>]
[<event_filter_list>]
[<event_parameters>]
[<action_list>]
[off]‘
<event_id> ::= <event_name | number>[<target_parameters>]
<event_scope> ::= [<scope_name>: scope_parameters]
<event_filter> ::= {<filter_name>: filter_parameters}
<action> ::= <action_name>(action_parameters)
<*_parameters> ::= <parameter_name> = <value>[, ]
I guess I can write all white paper just to cover all possible combinations.. Hopefully this will give you enough knowledge to build your own events command..
Hi Miladin,
Very insight stuff. Thanks for sharing this.
Can you please let me know how did you get through this combination or list of combination. Because i have never seen this kind of anywhere.
Glad that you like this stuff.
Please check my previous posts .. especially about bbed, oradebug and other “debugging” tools and you will get an idea..
What does “TYPE INCREMENT” and
“TYPE DECREMENT” do?
TYPE INCREMENT/DECREMENT/CONSTANT is intended to modify trace level on subsequent trace activations.
Sorry Vlad,
Completly forgot this one:
type increment(increment level up to ceiling)
type decrement(decrement level down to 0 and disable)
Miladin