1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Event Set in a particular session

Discussion in 'Server Administration and Options' started by prashant, Jun 14, 2011.

  1. prashant

    prashant Forum Advisor

    Messages:
    85
    Likes Received:
    7
    Trophy Points:
    160
    Location:
    New Delhi, India
    Hi,

    Is there a way I can know what session level events are set in a particular session?

    For e.g.

    I set event "alter session set events 'XXXXX trace name context forever';" in a session with SID 123.

    Now I need a query which will tell me that 'XXXXX' event is set in 123 session id.

    Thanks in advance.

    Best Regards,
    Prashant
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    There is no such query. You could use oradebug to report such information however you'll need to read a stack dump to get it:

    -- session #1
    alter session set "_optim_peek_user_binds" = false;
    alter session set sql_trace = true;

    alter session set events '10046 trace name context forever, level 1';
    alter session set events '10053 trace name context forever, level 1';


    -- session #2
    connect /as sysdba
    oradebug setospid 123
    oradebug dump errorstack 3

    The above generates a trace file in the user_dump_dest which contains:

    ...
    Dump event group for SESSION
    10053 trace name CONTEXT level 1, forever
    10046 trace name CONTEXT level 1, forever
    Dump event group for SYSTEM
    DYNAMICALLY MODIFIED PARAMETERS:
    sql_trace = TRUE
    _optim_peek_user_binds = FALSE
    _rowsource_execution_statistics= FALSE
    ...
     
    prashant likes this.