hanganalyze是ORACLE的一款性能诊断工具,这个款工具是从oracle 8.0.6开始可用,在oracle数据库出现严重的性能问题的时候它可以帮助你定位问题所在。
1.首先说说hanganalyze工具的用法
对于单实例数据库语法如下
alter session set events 'immediate trace name hanganalyze level ';
或则使用oradebug进行hanganalyze
conn /as sysdba
SQLPLUS>oradebug hanganalyze ;
对于RAC数据的语法如下
con /as sysda
SQLPLUS> oradebug setmypid
SQLPLUS>oradebug setinst all
SQLPLUS>oradebug -g def hanganalyze
session3使用hangalyze生成trace文件
SQL> connect / as sysdba
Connected.
SQL> oradebug hanganalyze 3;
Hang Analysis in /u01/app/oracle/admin/oracl/udump/oracl_ora_3941.trc
关于level的说明:
10 Dump all processes (IGN state)
5 Level 4 + Dump all processes involved in wait chains (NLEAF state)
4 Level 3 + Dump leaf nodes (blockers) in wait chains (LEAF,LEAF_NW,IGN_DMP state)
3 Level 2 + Dump only processes thought to be in a hang (IN_HANG state)
1-2 Only HANGANALYZE output, no process dump at all
#############################
[level 4] : 23 node dumps -- [LEAF] [LEAF_NW] [IGN_DMP]
[level 5] : 36 node dumps -- [NLEAF]
[level 10] : 130 node dumps -- [IGN]
阅读(1712) | 评论(0) | 转发(0) |