ITPub博客

首页 > Linux操作系统 > Linux操作系统 > [oradebug命令学习4]HANGANALYZE

[oradebug命令学习4]HANGANALYZE

原创 Linux操作系统 作者:尛样儿 时间:2010-05-05 23:53:34 0 删除 编辑
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博客 ” ,链接:https://blog.itpub.net/23135684/viewspace-662007/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: AIX系统升级记录
请登录后发表评论 登录
全部评论
Oracle数据库管理员,Oracle数据库系统构架员;2012年7月出版《构建最高可用Oracle数据库系统:Oracle 11gR2 RAC管理、维护与性能优化》一书;Oracle 10g OCM。

注册时间:2010-01-05

  • 博文量
    483
  • 访问量
    5648711