【翻譯自mos文章】為什麼在備份過程中rman不使用unused block 壓縮功能,rmanunused
為什麼在備份過程中rman不使用unused block 壓縮功能?
來源於:
Why is RMAN not using Unused Block Compression during backup? (文檔 ID 798844.1)
適用於:
Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.2 [Release 10.2 to 11.2]
Information in this document applies to any platform.
***Checked for relevance on 27-Nov-2013***
目標:
在10.2版本時,並符合下面的所有條件的情況下,rman將會使用unused block 壓縮功能:
The COMPATIBLE initialization parameter is set to 10.2There are currently no guaranteed restore points defined for the databaseThe datafile is locally managedThe datafile is being backed up to a backup set as part of a full backup or a level 0 incremental backupThe backup set is being created on disk or OSB backup to tape
Note:http://download.oracle.com/docs/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#i1015382.Oracle Database Backup and Recovery Reference11g Release 2 (11.2)Part Number E10643-04.Backup backupTypeSpecNote:If COMPATIBLE is set to 10.2, then only tablespaces created with 10.2 compatibility will be optimized to exclude blocks that do not currently contain data. If COMPATIBLE is set to 11.0.0 or higher, however, then the first backup that produces backup sets after COMPATIBLE is set to 11.0.0 or higher will update the headers of all locally managed datafiles so that all locally managed datafiles can be optimized.
但是,下面的來自於v$backup_datafile的查詢顯示:在備份期間,所有的datafile 均是全部掃描(%READ 是100)
SQL> set lines 120SQL> select file# fno, used_change_tracking BCT, incremental_level INCR, datafile_blocks BLKS, block_size blksz, blocks_read READ, round((blocks_read/datafile_blocks) * 100,2) "%READ", blocks WRTN, round((blocks/datafile_blocks)*100,2) "%WRTN" from v$backup_datafile where completion_time between to_date('25-jan-09 01:30:00', 'dd-mon-rr hh24:mi:ss') and to_date('26-jan-09 12:35:26', 'dd-mon-rr hh24:mi:ss') order by file#;---- Change the dates as necessary to encompass the backup start and end times-- and check the %READ value for each datafile.---->將如上指令碼的where條件修改一下,可以作為查詢datafile 掃描率的一個常用指令碼。
解決方案:
unused block 壓縮 對 10.2.0.1版本是不適用的。
只有當在打10.2.0.2patch之後建立的tablespace 才能使用unused block 壓縮
因此,對於如下情況的資料表空間, 是不能使用unused block 壓縮功能的:
在10.2.0.2之前建立的資料表空間
在compatible 被設定為10.2之前建立的資料表空間
The cause of this problem has been identified and verified in an 'unpublished' Bug 4720762 - Fixed in Product Version 11.0