Enable 10046 trace in Oracle

How to enable trace for particular statement in Oracle

To enable trace for a particular statement in Oracle:

--Enable 10046 trace & share trace file.

alter session set tracefile_identifier='10046';   
alter session set timed_statistics = true; 
alter session set statistics_level=all; 
alter session set max_dump_file_size = unlimited; 
alter session set events '10046 trace name context forever,level 12';

ALTER PACKAGE SYS.DBMS_AUDIT_UTIL COMPILE; >>>>>>>>>>Reproduce the issue.

exit;

For Disable the trace:

alter session set events '10046 trace name context off';

Get the trace file as identifier name: in my case its 10046

Upload the trace file with name 10046​​​​​​​

This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply