oracle trigger after logon on schema

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

showing results for - "oracle trigger after logon on schema"
Gwendoline
28 Jan 2019
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;