Oracle UNDO - 自动管理疑问解答

最近发现Oracle UNDO TUNED_UNDORETENTION持续增长
环境:RHEL5.5 x64 + Oracle 11.1.0.7.0
现状:
1,UNDO设置
    SQL> show parameter undo
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    undo_management                      string      AUTO
    undo_retention                       integer     900
    undo_tablespace                      string      APPS_UNDOTS1

2,UNDO数据文件为fixed_size
    SQL> select file_name,tablespace_name,bytes/1024/1024,AUTOEXTENSIBLE from dba_data_files where tablespace_name='APPS_UNDOTS1';
    FILE_NAME                                TABLESPACE_NAME                BYTES/1024/1024 AUT
    ---------------------------------------- ------------------------------ --------------- ---
    /oracle/db/apps_st/data/undo01.dbf       APPS_UNDOTS1                             12288 NO

3UNDO TUNED_UNDORETENTION
    BEGIN_TIME            END_TIME              TUNED_UNDORETENTION                                                                     
    --------------------- --------------------- -------------------                                                                     
    02-MAY-13 10:40       02-MAY-13 10:50                   7058731                                                                     
    02-MAY-13 10:50       02-MAY-13 11:00                   6999264                                                                     
    02-MAY-13 11:00       02-MAY-13 11:10                   6969871                                                                     
    02-MAY-13 11:10       02-MAY-13 11:20                   6860267                                                                     
    02-MAY-13 11:20       02-MAY-13 11:30                   5920566                                                                     
    02-MAY-13 11:30       02-MAY-13 11:40                   6396227                                                                     
    02-MAY-13 11:40       02-MAY-13 11:50                   6397659                                                                     
    02-MAY-13 11:50       02-MAY-13 12:00                   6385033                                                                     
    02-MAY-13 12:00       02-MAY-13 12:10                   6403607                                                                     
    02-MAY-13 12:10       02-MAY-13 12:20                   6403106                                                                     
    02-MAY-13 12:20       02-MAY-13 12:30                   6392924

4,UNDO EXPIRED/UNEXPIRED
    SQL> SELECT tablespace_name,status,SUM(bytes)/1024/1024 "Bytes(M)"  
              FROM   dba_undo_extents  
              GROUP BY  tablespace_name, status;
    TABLESPACE_NAME                STATUS      Bytes(M)
    ------------------------------ --------- ----------
    APPS_UNDOTS1                   ACTIVE            10
    APPS_UNDOTS1                   UNEXPIRED 12276.6875
    APPS_UNDOTS1                   EXPIRED          .25

疑问:
从官方文档的说明来看,当UNDO设置为fixed_size,undo_management=AUTO时,默认的UNDO_RETENTION=900不会生效,此时UNDO会根据当前表空间大小(12GB),和当前系统的状态自行调整当前的TUNED_UNDORETENTION大小,从v$UNDOSTA(或DBA_HIST_UNDOSTAT)来看,最近一段时间这里该参数值在增加。同时我的系统中,可用的UNDO空间已经没有了,而之前,可用的UNDO一直有2-3GB,且使用率相对固定,请问这里UNDO的空间需要继续增加吗?不增加的话,对系统有负面的影响吗?

解答:
当TUNED_UNDORETETION增加到很的时候,会导致大量未过期的UNDO(UNEXPIRED),由于undo_management=AUTO会自动去管理UNDO的使用,只要此时UNDO的fixed_size充足,只要未出现事务失败,空间不足的情况,可以不需要人为干预数据库。另外我们可以使用_undo_autotune=FALSE去关闭自动优化UNDO Retention的功能,同时设置合理的undo_retention,此时fixed_size下,undo_retention会生效。

参考
http://www.dbabeta.com/2010/undo-management_auto-undo-management.html
http://www.oracledatabase12g.com/archives/undo%E8%87%AA%E5%8A%A8%E8%B0%83%E4%BC%98%E4%BB%8B%E7%BB%8D.html
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5311668500346012409
https://forums.oracle.com/forums/thread.jspa?threadID=382810

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值