Oraclue

Oracle internals, debugging and undocumented features

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..

Advertisements

5 responses to “Oracle Diagnostic Events Part 3

  1. Taral Desai March 14, 2009 at 10:31 pm

    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.

  2. oraclue March 15, 2009 at 2:10 am

    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..

  3. Vlado March 16, 2009 at 12:52 am

    What does “TYPE INCREMENT” and
    “TYPE DECREMENT” do?

  4. Timur Akhmadeev March 17, 2009 at 2:32 pm

    TYPE INCREMENT/DECREMENT/CONSTANT is intended to modify trace level on subsequent trace activations.

  5. oraclue April 10, 2009 at 2:46 am

    Sorry Vlad,

    Completly forgot this one:

    type increment(increment level up to ceiling)
    type decrement(decrement level down to 0 and disable)

    Miladin

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: