透過sql查詢獲得當前session的trace檔名稱

mia發表於2005-04-18
一個簡單有用的指令碼[@more@]SELECT d.VALUE || '' || LOWER (RTRIM (i.INSTANCE, CHR (0))) || '_ora_' || p.spid || '.trc' trace_file_name FROM (SELECT p.spid FROM v$mystat m, v$session s, v$process p WHERE m.statistic# = 1 AND s.SID = m.SID AND p.addr = s.paddr) p, (SELECT t.INSTANCE FROM v$thread t, v$parameter v WHERE v.NAME = 'thread' AND (v.VALUE = 0 OR t.thread# = TO_NUMBER (v.VALUE))) i, (SELECT VALUE FROM v$parameter WHERE NAME = 'user_dump_dest') d

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35820/viewspace-796310/,如需轉載,請註明出處,否則將追究法律責任。

相關文章