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

Oracle undo表空间大小估算

2025/12/1 5:09:16发布27次查看
(ur) undo_retention in seconds (ups) number of undo data blocks generated per second (dbs) overhead varies based on exte
(ur) undo_retention in seconds
(ups) number of undo data blocks generated per second
(dbs) overhead varies based on extent and file size (db_block_size)
undospace = [ur * (ups * dbs)] + (dbs * 24)
上面的公式中,,第1、3个参数都可以轻松的从参数文件中得到:
sql> show parameter undo_retention
name         type  value
------------------------------------ ----------- ------------------------------
undo_retention        integer  5400
sql> show parameter db_block_size
name         type  value
------------------------------------ ----------- ------------------------------
db_block_size        integer  8192
现在重要的是要确定第2个参数:每秒钟生成undo block的总数,可以从 v$undostat 中得到。
每秒生成的undo量:
sql> select (sum(undoblks))/ sum((end_time - begin_time) * 86400) from v$undostat;
(sum(undoblks))/sum((end_time-begin_time)*86400)
--------------------------------------------------------------
          117.97590055
正常估算值:
select (ur * (ups * dbs)) + (dbs * 24) as bytes
from (select value as ur from v$parameter where name = 'undo_retention'),
(select (sum(undoblks)/sum(((end_time - begin_time)*86400))) as ups from v$undostat),
(select block_size as dbs from dba_tablespaces where tablespace_name=
(select upper(value) from v$parameter where name = 'undo_tablespace'));
最大值估算:
select (ur * ups * dbs + dbs * 24) / 1024 / 1024 as undo size(m)
from (select value as ur from v$parameter where name = 'undo_retention'),
     (select max(undoblks / ((end_time - begin_time) * 24 * 3600)) as ups from v$undostat),
     (select value as dbs from v$parameter where name = 'db_block_size');
建议在业务量繁重的那一天进行统计,而将undo表空间大小设为最大估算值以上。
说明:本文整理于how to size undo tablespace for automatic undo management [id 262066.1]
白银分类信息网,免费分类信息发布

VIP推荐

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