Friday, August 15, 2008

Audit an Oracle user with a Logon Trigger

CREATE OR REPLACE TRIGGER sadmin_logon_trg
AFTER LOGON ON DATABASE
WHEN (user="SCOTT") -- remove this line to turn it on for all users.
BEGIN
-- audit code here
END;