wait for a undo record等待事件

本文详细分析了在数据库恢复过程中出现的waitforaundorecord等待事件,包括其产生的原因、影响及解决方法。通过查询数据库等待事件统计和fast_start_servers状态,发现大量事务处于恢复状态导致此等待事件频繁发生。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天在做AWR分析时,碰到了个新的等待事件:wait for a undo record

Top 5 Timed Events                                         Avg %Total
~~~~~~~~~~~~~~~~~~                                        wait   Call
Event                                 Waits    Time (s)   (ms)   Time Wait Class
------------------------------ ------------ ----------- ------ ------ ----------
wait for a undo record               54,998       3,557     65   43.0      Other
CPU time                                          1,687          20.4
db file sequential read             187,848       1,632      9   19.7   User I/O
wait for stopper event to be i        4,027         278     69    3.4      Other
read by other session                47,621         276      6    3.3   User I/O
          -------------------------------------------------------------

查看了下当前数据库的等待事件,有大量的的Txn Recovery Start,
看样子是kill的大事务,数据库正在恢复

SQL> select sid, event, wait_class from v$session_wait s where s.EVENT not in ('SQL*Net message from client', 'rdbms ipc message');
 
SID     EVENT                                                            WAIT_CLASS
---- ---------------------------------------------------------------- ----------------------------------------------------------------
2070    PX Deq: Txn Recovery Start                    Idle
2114    PX Deq: Txn Recovery Start                    Idle
2168    PX Deq: Txn Recovery Start                    Idle
2239    SQL*Net message to client                    Network
2249    PX Deq: Txn Recovery Start                    Idle
2264    jobq slave wait                            Idle
2283    wait for a undo record                        Other
2306    PX Deq: Txn Recovery Start                    Idle
2383    jobq slave wait                            Idle
2414    PX Deq: Txn Recovery Start                    Idle
2455    PX Deq: Txn Recovery Start                    Idle
2474    jobq slave wait                            Idle
2475    db file sequential read                        User I/O
2492    jobq slave wait                            Idle
2499    PX Deq: Txn Recovery Start                    Idle
2512    PX Deq: Txn Recovery Start                    Idle
2550    PX Deq: Txn Recovery Start                    Idle
2556    PX Deq: Txn Recovery Start                    Idle
2591    PX Deq: Txn Recovery Start                    Idle
2629    PX Deq: Txn Recovery Start                    Idle
2664    PX Deq: Txn Recovery Start                    Idle
2700    db file sequential read                        User I/O
2712    PX Deq: Txn Recovery Start                    Idle
2726    jobq slave wait                            Idle
2727    Streams AQ: waiting for time management or cleanup tasks    Idle
2735    Streams AQ: qmn coordinator idle wait                Idle
2736    Streams AQ: qmn slave idle wait                    Idle
2738    jobq slave wait                            Idle
2748    wait for stopper event to be increased                Other
 
29 rows selected

查看v$fast_start_servers:

SQL> select pid, state, undoblocksdone from v$fast_start_servers;
 
       PID STATE       UNDOBLOCKSDONE
---------- ----------- --------------
       157 RECOVERING            3123
       322 RECOVERING               0
       335 RECOVERING               0
       455 RECOVERING               0
       458 RECOVERING               0
       460 RECOVERING               0
       461 RECOVERING               0
       463 RECOVERING               0
       467 RECOVERING               0
       468 RECOVERING               0
       471 RECOVERING               0
       472 RECOVERING               0
       477 RECOVERING               0
       480 RECOVERING               0
       481 RECOVERING               0
       484 RECOVERING               0
 
16 rows selected
 
SQL> select pid, state, undoblocksdone from v$fast_start_servers;
 
       PID STATE       UNDOBLOCKSDONE
---------- ----------- --------------
       157 RECOVERING            3458
       322 RECOVERING               0
       335 RECOVERING               0
       455 RECOVERING               0
       458 RECOVERING               0
       460 RECOVERING               0
       461 RECOVERING               0
       463 RECOVERING               0
       467 RECOVERING               0
       468 RECOVERING               0
       471 RECOVERING               0
       472 RECOVERING               0
       477 RECOVERING               0
       480 RECOVERING               0
       481 RECOVERING               0
       484 RECOVERING               0
 
16 rows selected


当数据库恢复结束,wait for a undo record等待事件消失
from:http://blog.chinaunix.net/u2/60220/showart_1950669.html
AC: [AC6605]sysname AC1 [AC1]interface GigabitEthernet 0/0/19 [AC1-GigabitEthernet0/0/19]port link-type trunk [AC1-GigabitEthernet0/0/19]port trunk allow-pass vlan all [AC1-GigabitEthernet0/0/19]q [AC1]vlan batch 100 101 Info: This operation may take a few seconds. Please wait for a moment...done. [AC1]dhcp enable Info: The operation may take a few seconds. Please wait for a moment.done. [AC1]interface vlan100 [AC1-Vlanif100]ip address 192.168.100.1 24 使用接口模式给AP地址池 [AC1-Vlanif100]dhcp select interface [AC1-Vlanif100]display this # interface Vlanif100 ip address 192.168.100.1 255.255.255.0 dhcp select interface # return [AC1-Vlanif100]q [AC1]capwap source interface vlanif 100 [AC1]wlan [AC1-wlan-view]security-profile name sec [AC1-wlan-sec-prof-sec]security wpa-wpa2 psk pass-phrase zz1234567 aes [AC1-wlan-sec-prof-sec]q [AC1-wlan-view]ssid-profile name ssid [AC1-wlan-ssid-prof-ssid]ssid wlan-2024 Info: This operation may take a few seconds, please wait.done. [AC1-wlan-ssid-prof-ssid]q [AC1-wlan-view]vap-profile name vap [AC1-wlan-vap-prof-vap]security-profile sec Info: This operation may take a few seconds, please wait.done. [AC1-wlan-vap-prof-vap]ssid-profile ssid Info: This operation may take a few seconds, please wait.done. [AC1-wlan-vap-prof-vap]service-vlan vlan-id 101 Info: This operation may take a few seconds, please wait.done. [AC1-wlan-vap-prof-vap]dis this # service-vlan vlan-id 101 ssid-profile ssid security-profile sec # return [AC1-wlan-vap-prof-vap]q [AC1-wlan-view]ap-group name ap Info: This operation may take a few seconds. Please wait for a moment.done. [AC1-wlan-ap-group-ap]q [AC1-wlan-view]ap-id 1 ap-mac 00e0-fc11-0450 ap1:display arp [AC1-wlan-ap-1]ap-name ap1 [AC1-wlan-ap-1]ap-group ap Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power and antenna gain configurations of the radio, Whether to c ontinue? [Y/N]:y Info: This operation may take a few seconds. Please wait for a moment.. done. [AC1-wlan-ap-1]ap-id 2 ap-mac 00e0-fc04-7bf0 ap2:display arp [AC1-wlan-ap-2]ap-name ap2 [AC1-wlan-ap-2]ap-group ap Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power and antenna gain configurations of the radio, Whether to c ontinue? [Y/N]:y Info: This operation may take a few seconds. Please wait for a moment.. done. [AC1-wlan-ap-2]q [AC1-wlan-view]ap-group name ap [AC1-wlan-ap-group-ap]vap-profile vap wlan 1 radio 0 Info: This operation may take a few seconds, please wait...done. [AC1-wlan-ap-group-ap]vap-profile vap wlan 1 radio 1 Info: This operation may take a few seconds, please wait...done. 为什么AP显示cfg状态,无法连接到STA
06-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值