oracle trigger after logon on database

Solutions on MaxInterview for oracle trigger after logon on database by the best coders in the world

showing results for - "oracle trigger after logon on database"
Samantha
07 May 2016
1CREATE OR REPLACE TRIGGER my_schema.trigger_name AFTER LOGON ON DATABASE
2BEGIN
3    INSERT INTO my_log_table
4    VALUES (USER AS CONNECTED_USER,
5        sys_context('USERENV', 'SESSIONID') AS SESSION_ID,
6        substr(sys_context('USERENV', 'OS_USER'), 1, 50) AS OS_USER,
7        substr(sys_context('USERENV', 'HOST'), 1, 30) AS HOST,
8        SYSDATE AS LOGON_DATE);
9END;
10ALTER TRIGGER my_schema.trigger_name ENABLE;