trigger on AFTER LOGON DATABASE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oracle newbie
    New Member
    • Jun 2007
    • 31

    trigger on AFTER LOGON DATABASE

    I found one coding on site and i have 2 doubt
    The DATABASE is refering to all the database ?
    Can I change the word to a Connection Name?

    create or replace trigger
    logon_audit_tri gger
    AFTER LOGON ON DATABASE
    BEGIN
    insert into stats$user_log values(
    user,
    sys_context('US ERENV','SESSION ID'),
    sys_context('US ERENV','HOST'),
    null,
    null,
    null,
    sysdate,
    to_char(sysdate , 'hh24:mi:ss'),
    null,
    null,
    null
    );
    END;
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    in your sample code the term DATABASE referes to the database in which the Trigger exists.

    So no need to specify the name.

    Comment

    Working...