Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 

 

hanganalyze tips


Oracle Database Tips by Donald BurlesonConsulting

6 September 2005

Oracle provides a special "hanganalyze" option within oradebug and "alter session set events" syntax to locate details about a hung session.  According to Oracle documentation, hanganalyze uses kernel calls to identify blocking and waiting sessions and hanganalyze may perform automatic processstate and errorstacks trace details.

You can invoke the hanganalyze with an alter session command as follows:

ALTER SESSION SET EVENTS 'immediate trace name hanganalyze level 3';

You can also gather a hanganalyze trace file to identify hung sessions with SQL*Plus when connected as SYSDBA:

  1. SQL> oradebug hanganalyze 3
  2. Wait at least 2 minutes to give time to identify process state changes.
  3. SQL> oradebug hanganalyze 3
  4. Open a separate SQL session and immediately generate a system state dump.
  5. SQL> alter session set events 'immediate trace name SYSTEMSTATE level 10';

You can also gat a trace dump to identify hung session details in Oracle Real Application Clusters (RAC) as follows:

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


Cautions:

  • Oracle notes that 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 Technical Support.
     
  • Oracle bug 1427041 for 8.1.6.2 notes that on HP/UX, the PMON process may crash the instance when the hanganalyzer syntax is invoked.

Once gathered, the trace file can be read manually or you can use a third party tool to assist in interpreting the resulting hanganalyze trace file.  The ubtools web site offers a product called iOraHangAnalyzer that claims to read the hanganalyze trace file and display details about the waiting session:  "iOraHangAnalyzer is a web based tool which scans Oracle's HANGANALYZE trace file, and returns waiting sessions with their wait-life-cycles."

References:

MOSC Note:175006.1 - Steps to generate HANGANALYZE trace files

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

 


 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2016

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.