Dear all,
Db version: 11gR2
We have application that create connections to db from one user. Some connection run some jobs, some runing some sql statements.
We need enable trace for this application user by "Action"
for example. when this application connects for run sql statement the trace enable.
I know we can use logon trigger and enable trace.
example:
CREATE OR REPLACE TRIGGER USER_TRACE_TRG
AFTER LOGON ON DATABASE
BEGIN
IF USER = SCOTT
THEN
execute immediate 'alter session set events ''10046 trace name context forever, level 12''';
END IF;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
/
but we need USER=SCOTT and ACTION=......
How we can enable with dbms_monitor?
can anyone help.