Monday, May 21, 2018

How to collect system state dumps and hang analysis

Instance/Standalone:
Hanganalyze:
sqlplus '/ as sysdba'
oradebug setmypid
oradebug unlimit
oradebug hanganalyze 3
SQL> oradebug hanganalyze 3
Hang Analysis in /u01/app/oracle/diag/rdbms/cfaex/CFAEX1/trace/CFAEX1_ora_207672.trc

-- Wait one minute before getting the second hanganalyze
oradebug hanganalyze 3
Hang Analysis in /u01/app/oracle/diag/rdbms/cfaex/CFAEX1/trace/CFAEX1_ora_207672.trc
oradebug tracefile_name
/u01/app/oracle/diag/rdbms/cfaex/CFAEX1/trace/CFAEX1_ora_207672.trc
Upload this to the SR.
Systemstatedump:
sqlplus '/ as sysdba'
oradebug setmypid
oradebug unlimit
oradebug dump systemstate 266
oradebug dump systemstate 266
oradebug tracefile_name
SQL> oradebug tracefile_name
/u01/app/oracle/diag/rdbms/cfaex/CFAEX1/trace/CFAEX1_ora_207672.trc
NOW exit out. Now we will have a trace file to upload to the SR engineer to diagnose further what was really happening at the time of a hang or an issue.
 RAC/All Instances:
Hanganalyze:
sqlplus '/ as sysdba'
oradebug setorapname reco
oradebug  unlimit
oradebug -g all hanganalyze 3
SQL> oradebug -g all hanganalyze 3
Hang Analysis in /u01/app/oracle/diag/rdbms/cfaex/CFAEX1/trace/CFAEX1_diag_206128.trc
Wait for a min run again.
oradebug -g all hanganalyze 3
SQL> oradebug -g all hanganalyze 3
Hang Analysis in /u01/app/oracle/diag/rdbms/cfaex/CFAEX1/trace/CFAEX1_diag_206128.trc

 Systemstatedump:
SQL> oradebug tracefile_name
/u01/app/oracle/diag/rdbms/cfaex/CFAEX1/trace/CFAEX1_ora_34320.trc
SQL> oradebug dump systemstate 266
Statement processed.

exit

No comments:

Post a Comment