How to generate Hang Analyze Report

 Sometimes database hangs due to many reasons and higher managements look for for RCA. It is important to have all trace file to find the issue for hanging the database or fine the RCA.

Get a hang analyze report by running below commands 

SQL> sqlplus / as sysdba 
SQL> oradebug setmypid 
SQL> oradebug unlimit
SQL> oradebug hanganalyze 3
# Wait at least 2-3 minutes to give time to identify process state changes.
SQL> oradebug hanganalyze 3
# Wait at least 2-3 minutes to give time to identify process state changes.
SQL> oradebug hanganalyze 3
SQL> oradebug tracefile_name   

SQL> select name, value from v$diag_info where name='Default Trace File'; 

In case database can't be connected  at all then please do  to the following commands 

connect / as sysdba 
oradebug setmypid 
oradebug unlimit
oradebug dump systemstate 266 -g; 
oradebug dump systemstate 266 -g; 
oradebug dump systemstate 266 -g; 

To generate HANGANALYZE for RAC:

SQL> oradebug setmypid 
SQL> oradebug setinst all
SQL> oradebug -g def hanganalyze 3
# Wait at least 2-3 minutes to give time to identify process state changes.
SQL> oradebug -g def hanganalyze 3
# Wait at least 2-1 minutes to give time to identify process state changes.
SQL> oradebug -g def hanganalyze 3

It is not recommended to run HANGANALYZE at levels higher than 3 because it may generate a huge number of trace files for complex systems. Please check with Oracle Support.

SQL> oradebug setmypid 
SQL> oradebug setinst all
SQL> oradebug -g def hanganalyze 2
# Wait at least 1-2 minutes to give time to identify process state changes.
SQL> oradebug -g def hanganalyze 2
# Wait at least 1-2 minutes to give time to identify process state changes.
SQL> oradebug -g def hanganalyze 2

For reference Oracle Support Documents:
  • Troubleshooting Database Hang Issues (Doc ID 1378583.1)
  • How to Collect Diagnostics for Database Hanging Issues (Doc ID 452358.1)
  • Troubleshooting Database Contention With V$Wait_Chains (Doc ID 1428210.1)
  • Event: Hanganalyze – Reference Note (Doc ID 130874.1)
  • Important Customer information about using Numeric Events (Doc ID 75713.1)


Comments

Popular posts from this blog

How to fix Oracle SQL Developer connection issue "Got minus one from a read call"

How to drop index and before dropping it how to get the DDL.

How to troubleshoot Long Running Concurrent Request in EBS 12.2

How to autopopulate user_guid in fnd_user table ( EBS Blank Page)

Opatch is getting faild for GI patch with error code 2 while doing prereq

Few Important steps of Oracle Database Clone

How to Check AD and TXK code levels in your EBS environment

The Server is not able to service this request: [Socket:000445]Connection rejected, filter blocked Socket, weblogic.security.net.FilterException

CPU Patch Analysis

PRVG-11250 : The check "RPM Package Manager database" was not performed because