ISSUE:
it is required to trace user session, which is initiated from application. it is hard to issue 'alter session set events ... " statement.
SOLUTION:
create a logon trigger to set up session trace.
e.x:
prompt 'this need be run as sys to create logon trigger to trace user session.'
accept UNAME prompt 'please input shcema name like UAT_TEST :'
CREATE OR REPLACE TRIGGER LOGON_TRACE
AFTER LOGON ON DATABASE
WHEN ( USER = upper('&UNAME') )
BEGIN
execute immediate 'alter session set events ''10046 trace name context forever, level 16''';
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
/
reference:
http://newappsdba.blogspot.com/2007/09/tip-tracing-session-via-login-trigger.html
No comments:
Post a Comment