Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Enable trace for specific users

2790572Jul 13 2015 — edited Jul 13 2015

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.

This post has been answered by Hemant K Chitale on Jul 13 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 10 2015
Added on Jul 13 2015
6 comments
5,010 views