使用oradebug转储systemstate/processstate

当数据库出现一些挂起状态时,如果sqlplus仍然可以连接,可能视图查询没有相应,但是可以通过oradebug工具来进行进程及系统状态信息的转储,从而可以进行Hang分析。
DUMP进程状态可以使用:

alter sessions set events 'immediate trace name processstate level ';

或者使用:

oradebug setmypid
oradebug ulimit
oradebug dump processstate
当诊断数据库挂起条件时可以DUMP系统状态:
alter sessions set events 'immediate trace name systemstate level ';
或:
oradebug setmypid
oradebug ulimit
oradebug dump systemstate

如果为了获取全面一点的信息,可以使用Level 10。
SQL>oradebug setmypid
SQL>oradebug unlimit
SQL>oradebug dump systemstate 10

今天一个朋友的请求帮助,获得的系统状态如下: System State 1
~~~~~~~~~~~~~~~~
1:                                     
2:  waiting for 'pmon timer'            wait
3:  waiting for 'rdbms ipc message'     wait
4:  waiting for 'rdbms ipc message'     wait
5:  waiting for 'rdbms ipc message'     wait
6:  waiting for 'rdbms ipc message'     wait
7:  waiting for 'rdbms ipc message'     wait
8:  waiting for 'buffer busy waits' (2,9,11) wait
9:  waiting for 'rdbms ipc message'     wait
10: waiting for 'rdbms ipc message'     wait
11: waiting for 'log file switch (archiving needed)' wait
12: waiting for 'rdbms ipc message'     wait
13:                                    
14:                                    
15: waiting for 'log file switch (archiving needed)' wait
16: waiting for 'library cache lock'   [LOCK: handle=20e750ca8] wait
17: waiting for 'rdbms ipc message'     wait
18: waiting for 'rdbms ipc message'     wait
19: waiting for 'buffer busy waits' (2,59,1b) wait
     Cmd: Select
20: waiting for 'log file switch (archiving needed)' wait
21: waiting for 'Streams AQ: qmn coordinator idle wait' wait
22: waiting for 'SQL*Net message from client' wait
23: waiting for 'SQL*Net message from client' wait
24: waiting for 'library cache lock'   [LOCK: handle=20e750ca8] wait
25: waiting for 'buffer busy waits' (1,2ba2,1) wait
26: last wait for 'SQL*Net message from client'
…………………………………………………………………
243:waiting for 'log file switch (archiving needed)' wait
     Cmd: Select
248:waiting for 'SQL*Net message from client' wait
249:waiting for 'SQL*Net message from client' wait
250:waiting for 'SQL*Net message from client' wait
251:waiting for 'SQL*Net message from client' wait
252:waiting for 'log file switch (archiving needed)' wait
…………………………………………………………………
273:waiting for 'log file switch (archiving needed)' wait
     Cmd: Insert
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 the
    waited upon resources, together with the holder of that resource.
    Notes:
    ~~~~~
     o A process id of '???' implies that the holder was not found in the
       systemstate.
                    Resource Holder State
      LOCK: handle=20e750ca8    15: waiting for 'log file switch (archiving needed)'
Object Names
~~~~~~~~~~~~
LOCK: handle=20e750ca8    TABL:EXFSYS.RLM$EVTCLEANUP   
显然是归档满了,导致了系统挂起。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/628922/viewspace-700727/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/628922/viewspace-700727/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值