Search notes:

Oracle: init parameter TRACEFILE_IDENTIFIER

If the value of tracefile_identifier was changed with an alter session set tracefile_identifier = '…' statement, the value is then found in the column traceid in v$process.
The value of tracefile_identifier also facilitates finding a particular process' trace file:
alter session set tracefile_identifier = 'thatsMe';
select value from v$diag_info where name = 'Default Trace File';
exec dbms_monitor.session_trace_enable;
select
  …
from
  …;
exec dbms_monitor.session_trace_disable;

Bug when setting TRACEFILE_IDENTIFIER

Cary Millsap describes a bug related to setting tracefile_identifier:
When you set TRACEFILE_IDENTIFIER, the Oracle kernel process closes the existing trace file and opens a new one. The new file doesn't contain all of the information that it should. Specifically, it will not contain some "PARSING IN CURSOR" sections that have been written to the first of the two trace files. Impact is that, when we look at the trace file whose name has the new tracefile identifier in it, we can't determine the SQL or PL/SQL associated with all the cursors reported on in the trace. The workaround is to simply never use TRACEFILE_IDENTIFIER. This has been a problem since at least Oracle 10g, and it's still reproducible in 23c FREE.

See also

The parameter sql_trace
tracefile.sql

Index