Bug 3426

Summary: Extend SQL triggers to fire on system events such as AFTER LOGON
Product: SQL Reporter: Martin van Dinther <martin.van.dinther>
Component: allAssignee: SQL devs <bugs-sql>
Status: NEW ---    
Severity: enhancement    
Priority: Normal    
Version: -- development   
Hardware: All   
OS: All   

Description Martin van Dinther cwiconfidential 2014-01-31 16:12:03 CET
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0
Build Identifier: 

It would be handy to have support for (some) system event triggers, such as
CREATE TRIGGER my_logon_trigger AFTER LOGON

In Oracle you can use for instance:
CREATE OR REPLACE TRIGGER SYS.my_logon_trigger
AFTER LOGON
ON DATABASE
ENABLE
declare
v_user varchar2(30):=user;
sql_stmt1 varchar2(256) :='alter session set nls_date_format='YYYY-MM-DD HH24:MI:SS';
begin
   if (v_user='Martin') THEN
        execute immediate sql_stmt1;
   end if;
end;
/

Note that this syntax is Oracle specific and NOT standard SQL.

Reproducible: Didn't try




this could resolve issue id=3322