ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 使用systemstate dump的方法

使用systemstate dump的方法

Linux操作系统 作者:jichengjie 时间:2015-03-12 15:07:28 0 删除 编辑

当数据库hang住的时候,如果能够使用sqlplus登录数据库,那么debug也许是你的不错的选择。而systemstate dump、 hang analyze也是我们解决问题的有效途径

下面就是systemstate dump的使用方法

when database met problems or malfunction, systemstate dump is necessary for further investigation. Following the below steps is a guide from metalink engineer.

Take 2 (it must be at least 2) system states level 266

+ ON RAC
- open a sqlplus SYSDBA connection to dump systemstates:
(if you can’t connect see 359536.1 for an explanation on the -prelim option)
SQL> connect /as sysdba
SQL> oradebug setmypid
SQL> oradebug unlimit
- when the hang happens, use the above sqlplus from one of the instances to get the dumps

//每隔2分钟执行一次,执行3三次
SQL> oradebug -g all hanganalyze 3
2 minutes
SQL> oradebug -g all hanganalyze 3
2 minutes
SQL> oradebug -g all hanganalyze 3
2 minutes
SQL> oradebug -g all dump systemstate 266
SQL> oradebug -g all dump systemstate 266
SQL> oradebug -g all dump systemstate 266
- now pick up alert.logs and all tracefiles generated or updated on all instances during t
he time the above commands where running, zip & upload

+ SINGLE INSTANCE
- open a sqlplus SYSDBA connection to dump systemstates:
(if you can’t connect see 3 59536.1 for an explanation on the -prelim option)
SQL> connect /as sysdba
SQL> oradebug setmypid
SQL> oradebug unlimit
- when the hang happens, use the above sqlplus from one of the instances to get the dumps
SQL> oradebug hanganalyze 3
2 minutes
SQL> oradebug hanganalyze 3
2 minutes
SQL> oradebug hanganalyze 3
2 minutes
SQL> oradebug dump systemstate 266
SQL> oradebug dump systemstate 266
SQL> oradebug dump systemstate 266
- now pick up alert.logs and all tracefiles generated or updated on all instances du
ring the time the above commands where running, zip & upload

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26870952/viewspace-1457241/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
成为全能!

注册时间:2012-04-10

  • 博文量
    167
  • 访问量
    502035