如何评估oracle 数据库rman全备和增量备份大小

1.评估oracle 数据库rman 全备的大小:

SQL> select sum(bytes)/1024/1024 from v$datafile;

SUM(BYTES)/1024/1024
--------------------
990

SQL> select sum(bytes)/1024/1024 from dba_free_space;

SUM(BYTES)/1024/1024
--------------------
344.25

rman 全备大小:


990-344.25=645.75 Mb

2.评估oracle 数据库rman 增量备份的大小:

评估rman 增量备份大小前提是开启了块跟踪(block change tracking)

select file#,
blocks_changed,
block_size,
blocks_changed * block_size bytes_changed,
round(blocks_changed / blocks * 100, 2) percent_changed
from v$datafile join
(select fno
file#,
sum(bct) blocks_changed
from (select distinct fno, bno, bct from x$krcbit
where vertime >= (select curr_vertime from x$krcfde
where csno=x$krcbit.csno and fno=x$krcbit.fno))
group by fno order by 1)
using(file#);

原文地址:https://www.cnblogs.com/sky2088/p/13364866.html