RMAN備份中不同版本是否備份空資料塊的問題
RMAN有兩種不同的壓縮方式 :
1. Null Compression
2. Unused Block Compression
在Oracle9i開始到10.1,RMAN僅僅支援NULL compression, RMAN不會備份從來沒有被分配使用的Block但是會備份曾經被使用但是當前沒有資料的塊 。
從10.2版本開始,Oracle RMAN不再備份目前不包含資料的Block(包括從來沒有分配的block以及曾經被使用但當前沒有資料的塊)這被稱為Unused Block Compression 。
-------------------------------------------------------------------------------------------------------------
參考: Metalink Doc ID: 563427.1
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.
Skipping unused data blocks where possible enables RMAN to back up datafiles using less space, and can make I/O more efficient.
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.
--------------------------------------------------------------------------------
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-615802/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 不同版本下的rman壓縮備份
- RMAN說,我能備份(3)--RMAN全庫備份和表空間備份
- 【RMAN】使用增量備份更新資料庫備份映象資料庫
- Backup And Recovery User's Guide-備份資料庫-RMAN備份概覽-RMAN備份的目的GUIIDE資料庫
- OS和資料庫版本不同對RMAN備份還原的影響資料庫
- 【原】Oracle學習系列—資料庫備份—RMAN備份Oracle資料庫
- 使用RMAN備份資料庫資料庫
- Backup And Recovery User's Guide-備份RMAN備份-使用RMAN備份備份集GUIIDE
- RMAN說,我能備份(11)--RMAN中的備份集屬性
- RMAN備份恢復——RAC環境資料庫的備份(zt)資料庫
- RMAN備份恢復--RAC環境資料庫的備份(十)資料庫
- RMAN備份恢復——RAC環境資料庫的備份(一)資料庫
- 資料庫差異備份與增量備份的不同之處資料庫
- Rman增量壓縮備份來解決備份空間不足
- Backup And Recovery User's Guide-備份資料庫-RMAN備份概覽-為RMAN備份指定TAGGUIIDE資料庫
- 熱備份與RMAN備份中split block的處理BloC
- RMAN說,我能備份(18)--RMAN中的加密備份和CATALOG加密
- RMAN說,我能備份(13)--RMAN中的備份壓縮和加密加密
- RMAN說,我能備份(9)--RMAN增量備份與備份保留策略
- Backup And Recovery User's Guide-RMAN備份概念-RMAN備份的多個拷貝-備份的備份GUIIDE
- Backup And Recovery User's Guide-備份RMAN備份-用RMAN備份映象拷貝備份GUIIDE
- Backup And Recovery User's Guide-RMAN備份概念-備份集-備份集塊壓縮GUIIDE
- exp備份和rman備份的區別
- Backup And Recovery User's Guide-備份資料庫-RMAN備份概覽-為RMAN備份指定格式GUIIDE資料庫
- Backup And Recovery User's Guide-備份RMAN備份-關於備份的備份GUIIDE
- 利用RMAN備份重建資料庫資料庫
- RMAN 只備份當前資料?
- 如何用rman 不備份只讀表空間的資料
- Oracle裡邏輯備份、物理備份、Rman備份的區別Oracle
- RMAN說,我能備份(4)--RMAN備份資料檔案和控制檔案
- 【備份】RMAN中對控制檔案的幾種備份方法
- 【RMAN】利用備份片還原資料庫(中)資料庫
- Backup And Recovery User's Guide-備份資料庫-使用RMAN備份表空間和資料檔案GUIIDE資料庫
- rman備份和增量備份指令碼指令碼
- Backup And Recovery User's Guide-備份RMAN備份-備份保留期對備份的備份的影響GUIIDE
- 關於9i RMAN 增量備份中的資料塊SCN比較
- 資料備份≠容災備份
- Oracle RMAN中全備份與0級備份區別Oracle