SELECT s.SID,
s.SERIAL#,
pa.VALUE || '/' || lower(sys_context('userenv', 'instance_name')) ||
'_ora_' || p.SPID || '.trc' AS TRACE_FILE
FROM V$SESSION s, V$PROCESS p, V$paRAMETER pa
WHERE pa.NAME = 'user_dump_dest'
AND s.paDDR = p.ADDR
AND s.AUDSID = sys_context('USERENV', 'SESSIONID');