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!

Need to enable trace for a Schema

JhilJun 21 2021

Dear Experts,
Our Developer team is asking to enable a trace for a specific schema !

CREATE OR REPLACE TRIGGER USER_TRACING_SESSION
AFTER LOGON ON DATABASE
BEGIN
IF USER = 'APP_USER_NAME' THEN
execute immediate 'alter session set events ''10046 trace name context forever, level 12''';
END IF;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
/

Is this right approach ?
or do i need any other approach ?
DB Versions are 12.1. 12.2 and 19c
Thanks in Advance

This post has been answered by EdStevens on Jun 22 2021
Jump to Answer
Comments
Post Details
Added on Jun 21 2021
6 comments
755 views