If the Oracle database hang crashes, system dump or hang analyze is performed on Oracle, which is an effective way to study and solve the problem. If you can connect to the database and perform operations, using oradebug is a simple and quick way.
Oraclehanganalyze function to diagnose dbhanging
Http://blog.csdn.net/tianlesoftware/article/details/6321961
Oracleoradebug command instructions
Http://blog.csdn.net/tianlesoftware/article/details/6525628
Sys @ anqing1 (Rac1)> oradebug setmypid
Statement processed.
Sys @ anqing1 (Rac1)> oradebug dump systemstate 10
Statement processed.
Sys @ anqing1 (Rac1)> oradebug tracefile_name
/U01/APP/Oracle/admin/Anqing/udump/anqing1_ora_8725.trc
Sys @ anqing1 (Rac1)> oradebug close_trace
Statement processed.
In system Hung, systemstate is basically equivalent to hanganalyze and can be used to diagnose system hung. However, it is troublesome to view the trace file directly. In this case, you can use the ass. awk script to help us view the trace file.
The ass. awk script is in the ltom431 \ ltom \ tom_base \ Tom \ src directory of ltom. Its name is ass109.awk. This is the latest version. The ass. awk script can help us analyze and format the system state dump.
Description of ltom MOS:
Ltom-Theon-board monitor User Guide [ID 352363.1]
Ltom's:
Http://download.csdn.net/detail/tianlesoftware/4047944
Awk is a programming language used to process text and data in Linux/Unix. Data can come from standard input, one or more files, or the output of other commands.
For more information about awk, see:
Linux awk command description
Http://blog.csdn.net/tianlesoftware/article/details/6278273
Here we use the-fscripfile parameter of the AWR command, that is, to read the awk command from the script file. This script is ass109.awk in our ltom.
Example:
[Oracle @ Rac1 SRC] $ awk-F ass109.awk/u01/APP/Oracle/admin/Anqing/udump/anqing1_ora_8725.trc
Starting systemstate 1
...................................
Ass. awk version 1.0.9-processing/u01/APP/Oracle/admin/Anqing/udump/anqing1_ora_8725.trc
System state 1
~~~~~~~~~~~~~~~~
1:
2: Waiting For 'pmon timer' wait
3: Waiting For 'diag idle wait' wait
4: Waiting For 'rdbms IPC message' wait
5: Waiting For 'rdbms IPC message' wait
6: Waiting For 'ges remote message' wait
7: Waiting For 'gcs remote message' wait
8: Waiting For 'rdbms IPC message' wait
9: Waiting For 'rdbms IPC message' wait
10: Waiting For 'rdbms IPC message' wait
11: Waiting For 'rdbms IPC message' wait
12: Waiting For 'buffer busy waits '(2,89, 21) Wait
13: Waiting For 'rdbms IPC message' wait
14: Waiting For 'enq: js-queue lock' [enqueue js-00000000-00000001] Wait
15: Waiting For 'buffer busy waits '(2,89, 21) Wait
16: Waiting For 'rdbms IPC message' wait
17:
18:
19: Waiting For 'rdbms IPC message' wait
20: Waiting For 'Log file switch (archivingneeded) 'Wait
21: Waiting For 'asm background timer 'Wait
22: Waiting For 'rdbms IPC message' wait
23: Waiting For 'Log file switch (archivingneeded) 'Wait
24: Last wait for 'SQL * Net message fromclient'
25: For 'streams AQ: Waiting For messagesin the queue 'wait
26: Waiting For 'streams AQ: qmn slave idlewait' wait
27: Waiting For 'rdbms IPC message' wait
28: Waiting For 'rdbms IPC message' wait
29: Waiting For 'class slave wait' wait
30:
31: Waiting For 'streams AQ: qmncoordinator idle wait' wait
32: Waiting For 'SQL * Net message fromclient' Wait
34: Waiting For 'SQL * Net message fromclient' Wait
36: Waiting For 'jobq slave wait' wait
37: For 'streams AQ: Waiting For timemanagement or cleanup tasks 'Wait
Blockers
~~~~~~~~
Above is a list of all the processes. If they are waiting for a resource
Then it will be given in square brackets. Below is a summary of
Waited upon resources, together with the holder of that resource.
Notes:
~~~~~
O A process ID '??? 'Implies that the holder was not found in
Systemstate.
Resource holder state
Enqueue js-00000000-00000001 23: Waiting For 'Log file switch (archivingneeded )'
Object names
~~~~~~~~~~~~
Enqueue js-00000000-00000001
48768 lines processed.
[Oracle @ Rac1 SRC] $
The trace results after processing with ass. awk are much more intuitive:
[Oracle @ Rac1 SRC] $ head-100/u01/APP/Oracle/admin/Anqing/udump/anqing1_ora_8725.trc
/U01/APP/Oracle/admin/Anqing/udump/anqing1_ora_8725.trc
Oracle Database 10g enterprise editionrelease 10.2.0.4.0-Production
With the partitioning, real applicationters ters, OLAP, Data Mining
And real application testing options
ORACLE_HOME =/u01/APP/Oracle/product/10.2.0/db_1
System name: Linux
Node name: Rac1
Release: 2.6.18-194. EL5
Version: #1 SMP Tue Mar 16 21:52:43 EDT 2010
MACHINE: i686
Instance name: anqing1
Redo thread mounted by this instance: 1
Oracle process number: 24
UNIX process PID: 8725, image: Oracle @ Rac1 (TNS V1-V3)
* ** 20:32:20. 758
* ** Action name :() 20:32:20. 755
* ** Module name :( sqlplus @ Rac1 (TNS V1-V3) 20:32:20. 755
* ** Service name :( sys $ users) 2012-02-0620: 32: 20.755
* ** Session ID: (118.34295) 2012-02-0620: 32: 20.755
========================================================== ==============
System State
------------
System global information:
Processes: Base 0x30e0ec78, size 150, cleanup 0x30e1dff8
Allocation: Free sessions 0x30e5a6c4, free CILS (nil)
Control alloc errors: 0 (process), 0 (Session), 0 (call)
Pmon latch cleanup depth: 0
Seconds since pmon's last scan for dead processes: 64
System statistics:
313621 logons cumulative
30 logons current
14842838 opened cursors cumulative
....
Bytes -------------------------------------------------------------------------------------------------------
All rights reserved. reprinted articles are allowed, but source addresses must be indicated by links. Otherwise, the documents will be held legally responsible!
Email: tianlesoftware@gmail.com
Skype: tianlesoftware
Blog: http://www.tianlesoftware.com
WEAVER: http://weibo.com/tianlesoftware
Twitter: http://twitter.com/tianlesoftware
Facebook: http://www.facebook.com/tianlesoftware
------- Add a group to describe the relationship between Oracle tablespace and data files in the remarks section. Otherwise, reject the application ----
Dba1 group: 62697716 (full); dba2 group: 62697977 (full) dba3 group: 62697850 (full)
Super DBA group: 63306533 (full); dba4 group: 83829929 dba5 group: 142216823
Dba6 group: 158654907 dba7 group: 172855474 DBA group: 104207940