Privilege for AFTER LOGON ON DATABASE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Reshmi Jacob
    New Member
    • Sep 2006
    • 50

    Privilege for AFTER LOGON ON DATABASE

    Hi

    I have created a trigger for identifying the users lgin history :



    create table logon_tbl (who varchar2(30), when date);

    create or replace trigger trg_logon_db
    after logon on database
    begin
    insert into logon_tbl (who, when) values (user, sysdate);
    end;


    But the problem is, it is showing INSUFFICEINT PRIVILEGES. Which is the privilege I have to grant this user to excute this trigger.?

    Thanks & Regards
    Reshmi
  • chandu031
    Recognized Expert New Member
    • Mar 2007
    • 77

    #2
    Originally posted by Reshmi Jacob
    Hi

    I have created a trigger for identifying the users lgin history :



    create table logon_tbl (who varchar2(30), when date);

    create or replace trigger trg_logon_db
    after logon on database
    begin
    insert into logon_tbl (who, when) values (user, sysdate);
    end;


    But the problem is, it is showing INSUFFICEINT PRIVILEGES. Which is the privilege I have to grant this user to excute this trigger.?

    Thanks & Regards
    Reshmi
    Hi Reshmi,

    You have to give the "administer database trigger" privilege for that.
    [code=sql]
    grant administer database trigger to <user>
    [/code]

    Cheers!!

    Comment

    Working...