当数据库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博客 ” ,链接:http://blog.itpub.net/12330444/viewspace-695109/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12330444/viewspace-695109/