[Translated from mos] Why does rman not use the unused block compression function during Backup? rmanunused
Why does rman not use the unused block compression function during the backup process?
Source:
Why is RMAN not using Unused Block Compression during backup? (Documentation ID 798844.1)
Applicable:
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 ***
Objectives:
In analyticdb 10.2, where all of the following conditions are met, rman will use the unused block compression function:
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.
However, the following query from v $ backup_datafile shows that during the backup, all datafiles are scanned (% READ is 100)
SQL> set lines 120SQL> select file # fno, used_change_tracking BCT, incremental_level INCR, datafile_blocks BLKS, block_size blksz, blocks_read, round (blocks_read/datafile_blocks) *, 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. ----> modify the where condition of the above script as a common script for querying the scanning rate of datafile.
Solution:
Unused block compression is not applicable to version 10.2.0.1.
Only the tablespace created after 10.2.0.2patch can be compressed using the unused block.
Therefore, the unused block compression function cannot be used for tablespaces in the following situations:
Tablespace created before 10.2.0.2
Tablespace created before compatible is set to 10.2
The cause of this problem has been identified and verified in an 'unpublished' Bug 4720762-Fixed in Product Version 11.0