Sorry for the delay, but here are my suggestions. First you will need to know where your trace file will be located. By default it will be in the trace directory as part of the diagnostic destination. Make sure you know where your diagnostic destination is located.
SQL> show parameter diagNAME TYPE VALUE------------------------------------ ----------- ------------------------------diagnostic_dest string /u01/app/oracle
There are basically three four main ways to find your trace file.
Option 0 - Just ask
Well I learned something new, so I wanted to update this article. There is a view you can directly query to see your current trace file name.
SELECT value
FROM v$diag_info
WHERE name = 'Default Trace File';
This will show the correct trace file name when you update your TRACEFILE_IDENTIFER. So I would still recommend setting that as outlined in Option 1.
Option 1 - Manually set the trace file name
For this option, we set a session level parameter to drive the name of the trace file.
ALTER SESSION SET tracefile_identifier = 'SQLID_fua0hb5hfst77';
EXEC DBMS_SESSION.SET_SQL_TRACE(sql_trace => true);
Then disable the tracing:SELECT sum(t1.c), sum(t2.c)FROM t1, t2WHERE t1.a = t2.aAND t1.d = 10;
EXEC DBMS_SESSION.SET_SQL_TRACE(sql_trace => false);
cd /u01/app/oracle/diag/rdbms/t1db/t1db/trace/[oracle@srvr03 trace]$ ls -ltrh *fua0*-rw-r----- 1 oracle oinstall 4.3K Feb 5 08:29 t1db_ora_4978_SQLID_fua0hb5hfst77.trc-rw-r----- 1 oracle oinstall 2.0K Feb 5 08:29 t1db_ora_4978_SQLID_fua0hb5hfst77.trm
ALTER SESSION SET EVENTS '10053 trace name context forever, level 1'; -- CBO tracingALTER SESSION SET EVENTS '10046 trace name context forever, level 12'; -- Additional SQL trace informationSQL> show parameter max_dump_file_size;NAME TYPE VALUE------------------------------------ ----------- ------------------------------max_dump_file_size string unlimited
Option 2 - get your session diagnostic information
set linesize 100column name format a20column value format a70select name, value from v$diag_info where name = 'Default Trace File';NAME VALUE -------------------- ---------------------------------------------------------------------- Default Trace File /u01/app/oracle/diag/rdbms/t1db/t1db/trace/t1db_ora_31523.trc
Option 3 - Searching for the trace file
SQL> select userenv('SID') from dual;USERENV('SID') -------------- 19
find /u01/app/oracle/diag/rdbms/t1db/t1db/trace -name t1db_ora\*.trc -mtime 0 -exec grep -l "*** SESSION ID:(19." {} \;/u01/app/oracle/diag/rdbms/t1db/t1db/trace/t1db_ora_26655.trc /u01/app/oracle/diag/rdbms/t1db/t1db/trace/t1db_ora_4978_SQLID_fua0hb5hfst77_.trc /u01/app/oracle/diag/rdbms/t1db/t1db/trace/t1db_ora_31523.trc /u01/app/oracle/diag/rdbms/t1db/t1db/trace/t1db_ora_14396.trc