Steps to create trigger to trace a user session

CREATE OR REPLACE TRIGGER USER_TRACE_TRG
AFTER LOGON ON DATABASE
BEGIN
    IF USER = '&USER_ID'
  THEN
    execute immediate 'alter session set events ''10046 trace name context forever,
    level 12''';
  END IF;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
/
  • January 2, 2018 | 17 views
  • Comments