Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1614468
  • 博文数量: 292
  • 博客积分: 10791
  • 博客等级: 上将
  • 技术积分: 2479
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-20 21:06
文章分类

全部博文(292)

文章存档

2011年(31)

2010年(261)

分类: Oracle

2010-09-08 13:55:11

Oracle10g中引入了一个新的自动调整undo retention的特性,本意是为了尽量避免ora-01555错误,但是自动的东西,有时候会不可避免的聪明过头,这个特性容易导致undo表空间过度使用无法回收。

在Oracle10gR2中只要使用了自动undo表空间管理,不管设置undo_retention为多少,自动undo retention特性都会启用。这时MMON进程每隔30秒会根据maxquerylen计算出一个tuned undo retention,然后将系统的undo retention设置为该值。如果undo tablespace的datafile是不能自动扩展的话,可能触发bug 5387030,tuned undo retenttion会变得非常大,导致undo表空间长时间无法回收空间。

通过以下查询可以查看tuned undo retention的值:

select tuned_undoretention, maxquerylen, maxqueryid from v$undostat;

在我们的一个案例中这个值最大达到了345600也就是96小时,使得undo表空间在事务比较频繁的情况下很快达到了100%的使用率,导致监控短信频繁响起。

知道了原因,解决方案也就有了:

  1. 10.2.0.2/10.2.0.3有相应的patch,这个bug在10.2.0.4中已经修复,建议找时间停机打patch
  2. 设置隐含参数_smu_debug_mode=33554432,将tuned_undoretention取值算法修正为max(maxquerylen secs + 300,undo_retention ),不建议使用
  3. 设置隐含参数_undo_autotune=false,关闭自动undo retention调整特性,不建议使用

参考:
Note:461480.1 FAQ – Automatic Undo Management (AUM) / System Managed Undo (SMU)
Note:240746.1 10g NEW FEATURE on AUTOMATIC UNDO RETENTION
Bug 5387030 – Automatic tuning of undo_retention causes unusual extra space allocation

阅读(3572) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-09-09 20:28:46

Download More than 1000 free IT eBooks: http://free-ebooks.appspot.com