2026-03-12 20:23:15

This commit is contained in:
root
2026-03-12 21:23:47 +01:00
parent eab4b36eca
commit 93039b8489
3332 changed files with 699614 additions and 0 deletions

32
vg/user_trace_files.sql Normal file
View File

@@ -0,0 +1,32 @@
/*
This script is to list the trace file name for every process. It takes the SPID and displays the complete trace file name, if one would exists.
*/
SET echo OFF lines 150
COLUMN username FORMAT a10
COLUMN trace_file FORMAT a70
SELECT s.username
, s.sid
, s.serial#
, p.spid
, udump.VALUE
|| DECODE ( SIGN ( INSTR ( udump.VALUE, '\' ) - 0 )
-- If `\` exists in path then use '\' as directory separator
,1, '\'
, '/'
)
|| LOWER ( db.VALUE )
|| '_ora_'
|| TO_CHAR ( p.spid, 'fm00000' )
|| '.trc' "TRACE_FILE"
FROM v$process p
, v$session s
, v$parameter udump
, v$parameter db
WHERE p.addr = s.paddr
AND udump.NAME = 'user_dump_dest'
AND db.NAME = 'db_name'
AND s.username IS NOT NULL;
SET echo ON