Oracle Support note Interpreting Raw SQL_TRACE output (39817.1). TKPROF
As of version 11.1, it ’ s much easier to query either the v$diag_info or v$process views, as shown in the following examples:
SQL> SELECT value
2 FROM v$diag_info
3 WHERE name = 'Default Trace File';
VALUE
--------------------------------------------------------------------
/u00/app/oracle/diag/rdbms/dba111/DBA111/trace/DBA111_ora_23731.trc
SQL> SELECT p.tracefile
2 FROM v$process p, v$session s
3 WHERE p.addr = s.paddr
4 AND s.sid = sys_context('userenv','sid');
TRACEFILE
--------------------------------------------------------------------
/u00/app/oracle/diag/rdbms/dba111/DBA111/trace/DBA111_ora_23731.trc
Note that the v$diag_info view provides information for the current session only.