IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    [原]ORACLE EVENT事件跟踪

    mchdba发表于 2016-09-03 05:58:19
    love 0

     

     

     

     

    设置10035事件

    SQL> exec dbms_workload_repository.create_snapshot();

     

    PL/SQL procedure successfully completed.

     

    SQL>  alter session set events '10035 trace name context forever,level 1';

     

    Session altered.

     

    SQL>

    SQL>  alter system set events '10035 trace name context forever,level 1';

     

    System altered.

     

    SQL>

     

     

    查看sql来源:

    # 这种一般是plsql等客户端的工具写的sql

    SQL> oradebug setospid 26630;

    Oracle pid: 67, Unix process pid: 26630, image: oracle@pldb1

    SQL> oradebug setospid 52811;

    ORA-00072: process "52811" is not active

    SQL>

     

    # 一般是应用程序过来的sql语句

    SQL> oradebug setospid 57135;

    ORA-00072: process "57135" is not active

    SQL>

     

     

     

    看到alert log后,记得关闭:

     

    ALTER SYSTEM SET EVENTS '10035 trace name context off';

     

     

     



沪ICP备19023445号-2号
友情链接