[oradebug命令学习4]HANGANALYZE

PURPOSE
-------

This article explain how to generate HANGANALYZE trace files to diagnostic database HANG issues.
When a database has a severe performance response time, the cause of the problem can be a HANG. 
Using HANGANALYZE trace files you can determine whether an Oracle process is blocking other processes, 
before starting a performance analysis.
 

Caution: HANGANALYZE run at levels higher that 3 may generate a huge number of trace files for large systems. 
Do not use levels higher than 3 without discussing their effects with Oracle Support. 


STEPS TO GENERATE A HANGANALYZE TRACE FILE:
======================================== 
Use the following set of commands to generate HANGANALYZE trace files.


1- Using SQL*Plus connect as "INTERNAL" (Oracle8i) or "/ AS SYSDBA" (Oracle9i)
 
2- Execute the following commands:
   SQL> oradebug hanganalyze 3 
   ... Wait at least 1 minutes to give time to identify process state changes.
   SQL> oradebug hanganalyze 3 

3- Open a separate SQL session and immediately generate a system state dump.

           $ sqlplus '/ as sysdba'
          oradebug setmypid
          oradebug unlimit
          oradebug dump systemstate 266
          wait 90 seconds
          oradebug dump systemstate 266
          wait 90 seconds
          oradebug dump systemstate 266
          quit


Note: Starting with Oracle 9.2 HANGANALYZE can generate HANGANALYZE cluster wide.
Using this feature you can generate session dependencies to all the sessions 
connected to all the instances of the RAC cluster. Use the following set of commands 
to generate a RAC cluster wide HANGANALYZE:

1- Using SQL*Plus connect as "/ AS SYSDBA" 
2- Execute the following commands:
   SQL> oradebug setmypid 
   SQL> oradebug setinst all
   SQL> oradebug -g def hanganalyze 3
   ... Wait at least 1 minutes to give time to identify process state changes.
   SQL> oradebug -g def hanganalyze 3


FYI:
====
   Due to BUG 1427041 running HANGANALYZE may terminate the instance 
   This is fixed in 8.1.7.3


RELATED DOCUMENTS
----------------- Note:215858.1 - Interpreting HANGANALYZE trace files to diagnose hanging and performance problems 

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

转载于:http://blog.itpub.net/23135684/viewspace-662007/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值