Communicate with customers at the time, have a customer database size is only 40G, but RMAN backup files out there are 80GB, use expdp guided by the DUMP file is smaller than 40GB, feeling somewhat surprised, not only RMAN backup data data block it? How backups should not exceed 40GB ah, is related with the high-water mark? With these questions by referring to a number of articles in the MOS, we found that there is the possibility of RMAN backup file is much larger than the space occupied by the database appear appear.
You must first understand RMAN compression type:
By default RMAN has three types of compression:
1. Null compression
2. Unused block compression
3. Binary compression <<<< This is our most commonly used type of compression, backup as compressed backupset ....
Till Oracle Version 10.1 only 'Null' compression is done by default but from Oracle Version 10.2 'Null' and 'unused block' compression is done. The types of compression are done automatically, no special command is required.
'Null' and 'unused block' compression are filtering which blocks are send to the backups. 'Binary' compression is an additional compression on the blocks send to the backup.
1. Null Compression:
When backing up datafiles into backup sets, RMAN does not back up the contents of data blocks that have never been allocated. (In previous releases, this behavior was referred to as NULL compression). This means RMAN will never backup the blocks that are ever used. RMAN, through Oracle version 9i and forward has performed null compression.
Example: You have a tablespace having one datafile of size 100MB and out of 100MB only 50 MB is used Then RMAN will backup only 50MB <<<< 10.2 in the previous version (accurate to say that the previous version 10.2.0.2). , Oracle default is this type of compression, RMAN does not back up unallocated blocks of data, in other words, RMAN backup is not never used blocks. For example: If a table space has a size of the data file is 100MB, the document uses 50MB, RMAN backs up only 50MB empty block (RMAN backup and is not the high-water line under the matter, and the data block has not been allocated over there relationship).
Null Compression also applies to SE and SE ONE
2. Unused Block Compression:
From Oracle version 10.2 forward, RMAN skips the blocks that do no currently contain data and this is called 'Unused Block Compression'. RMAN now creates more compact backups of datafiles, by skipping datafile blocks that are not currently used to store data. In previous releases, RMAN only supported NULL compression, which skipped space in datafiles that had never been allocated. No extra action is required on the part of the DBA to use this feature.
Example: You have a tablespace having one datafile of size 100MB and out of 100MB, 50MB is used by the user tables Then user dropped a table belonging to that tablespace which was of 25MB, with the new unused block compression on 25MB of the files. is backed up. in this example if null compression is used then it would have backed up 50MB because null compression will consider the blocks that are formatted / ever used. <<<< start from version 10.2 (accurate to say that the version 10.2.0.2 ), the emergence of a new type of compression -Unused block compression, this type of backup will skip the current block does not contain data (even if you've used the block), which is a new version of RMAN default compression. For example: If a table space has a file size of 100MB of data, 50MB for user tables, drop a user belonging to the table space 25MB size, the new default UNUSED BLOCK COMPRESSION compression type will only back up 25MB of data blocks . If NULL COMPRESSION compression type, backup data block 50MB, because NULL COMPRESSION compression type will be considered a block that has been formatted, or said that they had been used.
Unused Block Compression is done, if all of the following conditions apply: <<<< although UNUSED BLOCK COMPRESSION is 10.2 default compression type, but not that version 10.2 through RMAN backups will certainly use this compression type, use it must meet The following five criteria.
+ The COMPATIBLE initialization parameter is set to 10.2 <<<< even when upgrading to Oracle Database 10.2.0.2 or later, by default COMPATIBLE initialization parameter value is empty, to use UNUSED BLOCK COMPRESSION function must manually set the parameter.
+ There are currently no guaranteed restore points defined for the database <<<< no FLASHBACK Injunctive restore point.
+ The datafile is locally managed <<<< localization data file management mode, the default that is.
+ The datafile is being backed up to a backup set as part of a full backup or a level 0 incremental backup <<<< data files as part of a full backup, or based on 0 level backup incremental backup.
+ The backup set is being created on DISK <<<< backup set created on disk.
backup is done to TAPE using "OSB" (Oracle Secure Backup)! <<<< use OSB or backup data to tape, other third-party backup software can not use this type of compression can be NULL COMPRESSION.
Unused Block Compression is NOT used if backup done to tape using a THIRD PARTY BACKUP SOFTWARE!
Unused block compression IS executed in Standard Edition. <<<< Standard Edition can also use this type of compression.
Skipping unused data blocks where possible enables RMAN to back up datafiles using less space, and can make I / O more efficient.
Since the removal of the above "A Complete Understanding of RMAN Compression (Document ID 563427.1)"
The following description of the contents in 10.2.0.1 release, UNUSED BLOCK COMPRESSION compression type is not available:
Unused block compression is NOT available with the Base Release of 10gR2 (10.2.0.1).
It only became available in the first Patch Set Release (10.2.0.2) for NEW tablespaces only.
So for tablespaces created:
before 10.2.0.2 was applied
before compatible was set to 10.2
we can not use Unused Block Compression.
The cause of this problem has been identified and verified in an 'unpublished' Bug 4720762 - Fixed in Product Version 11.0
Above is an excerpt: "Why is RMAN not using Unused Block Compression during backup (Document ID 798844.1)?"
Summary: After the customer and confirmed customer database version is 10.2.0.4, so we boldly speculate, although higher than the client version 10.2.0.2, but because the default database initialization parameters COMPITABLE case is empty, or does not comply with other condition causes UNUSED bLOCK cOMPRESSION compression can not be used to type in RMAN, so those who have been used to block data RMAN will back up (NULL cOMPRESSION), 80GB may be the customers who use too much space, then release the corresponding space, showing only the current backup database RMAN backups are out 40GB 80GB.