hanganalyze和systemstate dump

月15日转载此文章,感谢 http://space.itpub.net/464838/viewspace-664380
 

当数据库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

+ ONRAC
- 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

Ref: Systemstate dump when connection to the instance is not possible [ID 359536.1]
 
1月17日oracle原厂工程师离开客户现场时,让我18日做如下操作:
Please take 2 systemstate dump when issue reproduces next time:
SQL> oradebug setmypid
SQL> oradebug unlimit
SQL> oradebug dump systemstate 10
<wait for 30 seconds>
SQL> oradebug setmypid
SQL> oradebug unlimit
SQL> oradebug dump systemstate 10
SQL> oradebug tracefile_name
Then upload the trace file generated.
 
用ass109工具分析生成的trace文件:
awk -f ass109.awk XXXX.trc
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值