Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1055186
  • 博文数量: 239
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 3618
  • 用 户 组: 普通用户
  • 注册时间: 2012-11-12 13:17
文章分类

全部博文(239)

文章存档

2021年(1)

2016年(1)

2015年(30)

2014年(91)

2013年(116)

分类: LINUX

2014-01-30 13:10:20

(1)初始化参数undo_retention
[oracle@oracle11g ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 30 11:58:55 2014
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
默认undo_retention的值是900s
SQL> show parameter undo_retention;
NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_retention     integer 900
SQL> alter system set undo_retention=3600;
System altered.


(2)查看UNDO表空间是否启用了自动增长功能,若是自动增长,则是undo_retention的参数的建议能够被最大限度的采纳。
SQL> select autoextensible from dba_data_files where tablespace_name = (select value from v$parameter where name ='undo_tablespace');
AUT
---
YES
(3)undo表空间是否绝对准守undo_retention的设置,将赊销数据(Undo Data)真正的保留那么久。默认情况下为数据库绝对不准守900s以上设置,即设置NOGUARANTEE
SQL> select retention from dba_tablespaces where tablespace_name = 'UNDOTBS1';
RETENTION
-----------
NOGUARANTEE


默认情况下为数据库绝对准守undo_retention的设置,即设置GUARANTEE
SQL> alter tablespace undotbs1 retention guarantee;
Tablespace altered.

这样做的目的是原本"建议"的undo_retention变为强制的"规定"了,现在是要求保留1小时的撤销数据了。


(4)数据库中的事务量
显然事务量越大产生的撤销数据的速率越高,面对庞大的事务量在设置以上3要素必须做出艰难的决定:闪回查询时间窗口可以有多大,最终取决于数据库能容忍一个多大的UNDO表空间,
即用空间换"过去的时间"。












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