Applies to:
Oracle Server – Enterprise Edition – Version: 8.1.7.4 to 11.1.0.6 – Release: 8.1.7 to 11.1
Information in this document applies to any platform.
Goal
How does RMAN compression works ?
Solution
A Complete Understanding of RMAN Compression
By default RMAN has two types of compression :
1. Null Compression
2. Unused Block Compression
Till Oracle Version 10.1 only Null compression in done by default but from Oracle Version 10.2 Null and Unused Block Compression is done. These compressions are done automatically, no special command is required for these compressions.
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. Till Oracle version 9i RMAN performs 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.
2. Unused Block Compression: From Oracle version 10.2 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 beloning 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.
Unused Block Compression is done, if all of the following conditions apply:
+ The COMPATIBLE initialization parameter is set to 10.2
+ There are currently no guaranteed restore points defined for the database
+ The datafile is locally managed
+ The datafile is being backed up to a backup set as part of a full backup or a level 0 incremental backup
+ The backup set is being created on disk.
BINARY COMPRESSION :
Binary Compression can be done by specifying “AS COMPRESSED” clause in backup command, this compression is called as binary compression.
RMAN can apply a binary compression algorithm as it writes data to backup sets. This compression is similar to the compression provided by many tape vendors when backing up data to tape. But we cannot give exact percentage of compression. This binary compression algorithm can greatly reduce the space required for disk backup storage. It is typically 2x to 4x, and greater for text-intensive databases.
The command to take the compressed backup :
RMAN> backup as compressed backupset database;
+ There is some CPU overhead associated with compressing backup sets. If the database being backed up is running at or near its maximum load, you may find the overhead from using AS COMPRESSED BACKUPSET unacceptable. In most other circumstances, compressing backupsets saves enough disk space to be worth the CPU overhead.
+ There is no special command to restore database from the compressed backupsets, the restore command will be the same as with uncompressed backups.
+ The restore from the compressed backpuset will take more time than uncompressed backupsets.
© 2009, www.oracledatabase12g.com. 版权所有.文章允许转载,但必须以链接方式注明源地址,否则追究法律责任.
相关文章 | Related posts:
- RMAN 11G : Data Recovery Advisor – RMAN command line example
- RMAN Performance Tuning Using Buffer Memory Parameters
- Rman 备份检验功能
- How to Minimise the impact of an Online RMAN Backup on an OLTP system
- How to Make Use of Oracle's Data Compression with Materialized Views.
- How to Extract Controlfiles, Datafiles, and Archived Logs from RMAN Backupsets
- Understanding Bootstrap Of Oracle Database
- Complete Upgrade Checklist for Manual Upgrades from 8.X / 9.0.1 to Oracle9iR2 (9.2.0)
- Understanding and Reading System states dump
- UNDERSTANDING CURSOR_SPACE_FOR_TIME WITH SAMPLE




最新评论