01.26.06

rman备份包括了以前曾经用过现在已经不被任何表使用的block

Posted in Oracle备份恢复 at 4:30 am by dosql

今天跟tzg讨论一个RMAN备份的问题: 如果一个表空间曾经被使用过, 但现在已经不再被任何表使用了, RMAN是不是把那些空间也备份下来?

测试步骤如下:


先CREATE TABLE xxx as select * from xxx
然后做FULL BACKUP
接着是DROP TABLE
再做FULL BACKUP
2者大小完全一样,为了方便,我把FILESPRET设为1的

测试的结果是只要表空间里的Block曾经被使用过, RMAN就会包含这些block.

这个好像有点不太合理, tzg发现了下面的文档, 确定在10gR2里这个问题才解决了. 现在手头没有10g的数据库, 以后有空再测试一下.


4。Unused Block Compression。我们的知识又一次被颠覆,记住,10gR2的RMAN备份是真的不备份那些没有用到的block了,不管是不是以前曾经用过.
By optimizing database backups, only blocks currently used by the database are backed up. In previous releases, NULL compression was utilized, whereby only never-used blocks were excluded from backup. With this new feature, all unused blocks, whether they have been used or not in the past, will be excluded from backup.


The only compression during RMAN backups is that it skips blocks that have never been used (uninitialized) by Oracle i.e. RMAN performans a sort of ‘unused blocks compression’. If a block has been previously used by Oracle and is now empty or unallocated, it will be included by RMAN in the backup. Well, this kind of makes sense since RMAN is desgined to perform backups even when the database is closed. In a closed database backup situation, RMAN does not have access to the data dictionary views to determine if the block is part of a segment or not.

Leave a Comment