您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

如何计算自动管理的UNDO表空间大小

2024/2/27 23:16:11发布8次查看
aum(自动 undo 管理,automatic undo management)几乎不需要配置。您基本上只需要定义将前映像保持可用的时间量。这是通过参数
auto undo
aum(自动 undo 管理,automatic undo management)几乎不需要配置。您基本上只需要定义将前映像保持可用的时间量。这是通过参数 undo_retention 控制的,以秒为单位定义。因此,值 900 表示 15 分钟。
 一定要意识到,如果 undo 表空间中存在空间压力时,我们不保证前镜像一定会保留这么长时间。
 因此,以下公式可用于计算最佳 undo 表空间大小:
 从 oracle 10g 开始,,您可以选择使用 guarantee 选项,以确保在定义的 undo_retention 时间之前,undo 信息不会被覆盖。
undo表空间大小由三部分组成:
(ur)undo_retention 单位秒
(ups)每秒产生的undo 数据块的个数
(dbs)数据库数据文件块的大小db_block_size
计算公式
undospace=ur*(ups*dbs)
其中undo_retention 和 db_block_size两部分的信息可以在实例配置参数信息中获取。
 而第三部分ups的信息需要从动态性能试图v$undostat中获取
 下面是获取(ups)每秒产生的undo 数据块的个数.
sql> select undoblks/((end_time-begin_time)*86400) peak undo block generation
 from v$undostat where undoblks=(select max(undoblks) from v$undostat);
其中列end_time and begin_time 是日期类型,需要转换成秒(24 hours * 60 minutes * 60 seconds).
下面的sql是计算undo表空间大小
sql> select (ur * (ups * dbs)) as bytes
      from (select value as ur from v$parameter where name = 'undo_retention'),
          (select undoblks/((end_time-begin_time)*86400) as ups
            from v$undostat
            where undoblks = (select max(undoblks) from v$undostat)),
          (select block_size as dbs
            from dba_tablespaces
            where tablespace_name = (select upper(value) from v$parameter where name = 'undo_tablespace'));
10g 和10g 更高的版本,可以使用下面的查询:
sql>select (ur * (ups * dbs)) as bytes
 from (select max(tuned_undoretention) as ur from v$undostat),
 (select undoblks/((end_time-begin_time)*86400) as ups
 from v$undostat
 where undoblks = (select max(undoblks) from v$undostat)),
 (select block_size as dbs
 from dba_tablespaces
 where tablespace_name = (select upper(value) from v$parameter where name = 'undo_tablespace'));
--------------------------------------------------------------------------------
rman备份与恢复之undo表空间丢失
关于oracle 释放过度使用的undo表空间
oracle undo的一些理解
oracle undo 镜像数据探究
oracle 回滚(rollback)和撤销(undo)
linux-6-64下安装oracle 12c笔记
在centos 6.4下安装oracle 11gr2(x64)
oracle 11gr2 在vmware虚拟机中安装步骤
debian 下 安装 oracle 11g xe r2
--------------------------------------------------------------------------------
本文永久更新链接地址:
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product