码迷,mamicode.com
首页 > 其他好文 > 详细

11g 和 19c 查看trace文件

时间:2020-06-28 10:02:51      阅读:82      评论:0      收藏:0      [点我收藏+]

标签:文件   tis   sha   查看   ber   instance   add   des   replace   

11g 查找trace文件

SELECT D.VALUE || ‘/‘ || LOWER(RTRIM(I.INSTANCE, CHR(0))) || ‘_ora_‘ ||
       P.SPID || ‘.trc‘ TRACE_FILE_NAME
  FROM (SELECT P.SPID
          FROM SYS.V$MYSTAT M, SYS.V$SESSION S, SYS.V$PROCESS P
         WHERE M.STATISTIC# = 1
           AND S.SID = M.SID
           AND P.ADDR = S.PADDR) P,
       (SELECT T.INSTANCE
          FROM SYS.V$THREAD T, SYS.V$PARAMETER V
         WHERE V.NAME = ‘thread‘
           AND (V.VALUE = 0 OR T.THREAD# = TO_NUMBER(V.VALUE))) I,
       (SELECT VALUE FROM SYS.V$PARAMETER WHERE NAME = ‘user_dump_dest‘) D;

19C查找trace文件

SELECT D.pat || ‘/‘ || 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 replace(VALUE, ‘cdump‘, ‘trace‘) pat
          FROM V$PARAMETER
         WHERE NAME = ‘core_dump_dest‘) D;

  

11g 和 19c 查看trace文件

标签:文件   tis   sha   查看   ber   instance   add   des   replace   

原文地址:https://www.cnblogs.com/omsql/p/13200865.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!