After Log On Trigger Does Not Fire
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: After Log On Trigger Does Not Fire

  1. #1
    Join Date
    Oct 2003
    Posts
    312

    After Log On Trigger Does Not Fire

    below is my trigger:

    create or replace trigger trace
    after logon on database
    begin
    if user = 'BATCH'
    then
    execute immediate 'alter session set sql_trace=true';
    end if;
    end;
    /



    BATCH user had DBA privilege. and for some reason, I kept getting the error :

    *** SESSION ID:(12.26) 2004-12-17 09:53:45.637
    Skipped error 604 during the execution of SYSTEM.TRACE
    *** 2004-12-17 09:53:45.827
    ksedmp: internal or fatal error
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01031: insufficient privileges
    ORA-06512: at line 10

  2. #2
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    I suspect this is like procedures, where you need to grant alter session explicitly to the user - granting via a role is not enough.

  3. #3
    Join Date
    Oct 2003
    Posts
    312
    thanks Dapi.


    also what are you tracing when you set level=12???

  4. #4
    Join Date
    Jul 2002
    Location
    Northampton, England
    Posts
    612
    It means you get information about binds and about wait events as well as your usual SQL stats.

  5. #5
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width