Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle gets the trace file name of the current session

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Get the default file name SQL as follows:

-- Type 1 SELECT u_Dump.Value | |'/'| | Lower (Db_Name.Value) | |'_ ora_' | | V$process.Spid | | Nvl2 (V$process.Traceid,'_'| | V$process.Traceid | NULL) | | '.trc' "Trace File" FROM V$parameter u_Dump CROSS JOIN V$parameter Db_Name CROSS JOIN V$process JOIN V$session ON V$process.Addr = V$session.Paddr WHERE u_Dump.Name = 'user_dump_dest' AND Db_Name.Name =' db_name' AND V$session.Audsid = Sys_Context ('userenv',' sessionid') -- second SELECT d.Value | |'/'| Lower (Rtrim (i.Instance, Chr (0) | |'_ ora_' | | p.Spid | | '.trc' AS "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

Eg:

/ data03/DEV4/db/9.2.0/admin/DEV4_mistest/udump/dev4_ora_9359834.trc

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report