zoukankan      html  css  js  c++  java
  • 【Oracle】跟踪文件目录(User_Dump_Dest)生成脚本(11g/9i).txt

    oracle 11g 生成跟踪目录(User_Dump_Dest)脚本:
    –设置合适显示长度:
    column trace new_val TRACE format a100
    –脚本:

    select c.value || '/' || d.instance_name || '_ora_' || a.spid || '.trc' trace
        from v$process a, v$session b, v$parameter c, v$instance d
       where a.addr = b.paddr
         and b.audsid = userenv('sessionid')
         and c.name = 'user_dump_dest'
    /

    –开启跟踪
    exec dbms_monitor.session_trace_enable
    –查看生成的跟踪文件目录
    !ls &TRACE

    例如:

    SYS@ORA11GR2> column trace new_val TRACE format a100
    SYS@ORA11GR2> 
    SYS@ORA11GR2> select c.value || '/' || d.instance_name || '_ora_' || a.spid || '.trc' trace
      2      from v$process a, v$session b, v$parameter c, v$instance d
      3     where a.addr = b.paddr
      4       and b.audsid = userenv('sessionid')
      5       and c.name = 'user_dump_dest'
      6  /
    
    TRACE
    ----------------------------------------------------------------------------------------------------
    /u01/app/oracle/diag/rdbms/ora11gr2/ORA11GR2/trace/ORA11GR2_ora_4146.trc
    
    SYS@ORA11GR2> exec dbms_monitor.session_trace_enable
    
    PL/SQL procedure successfully completed.
    
    SYS@ORA11GR2> !ls &TRACE
    /u01/app/oracle/diag/rdbms/ora11gr2/ORA11GR2/trace/ORA11GR2_ora_4146.trc

    oracle 9i 生成跟踪目录(User_Dump_Dest)脚本:
    –设置合适显示长度:
    column trace new_val TRACE format a100
    –脚本:

    select c.value || 'ora_' || a.spid || '.trc' trace 
    from v$process a, v$session b, v$parameter c
       where a.addr = b.paddr
         and b.audsid = userenv('sessionid')
         and c.name = 'user_dump_dest'
    /

    –开启跟踪
    exec dbms_monitor.session_trace_enable
    –查看生成的跟踪文件目录
    !ls &TRACE

  • 相关阅读:
    使用MulticastSocket实现多点广播(实现多人聊天室)
    双目相机标定以及立体测距原理及OpenCV实现
    opencv5-objdetect之级联分类器
    OpenCV人脸识别--detectMultiScale函数
    简单eclipse配置opencv的方法
    Struts2之Action的配置
    Struts2入门
    用户管理系统网站框架改进之MVC模式
    Tomcat中设置数据源和连接池
    JSP第一个实例之用户管理系统
  • 原文地址:https://www.cnblogs.com/NextAction/p/7366679.html
Copyright © 2011-2022 走看看