不同版本下的rman壓縮備份

oracle_mao發表於2013-12-19

實驗環境:
10.2.0.2 虛擬機器-linux 64位
11.1.0.6 小機-HPUNIX
11.2.0.3 小機-HPUNIX
 10G 推出了bzip2演算法的壓縮備份。
 11R1推出了zlib演算法的壓縮備份。
 11R2推出了基本壓縮備份和高階壓縮備份。
備註:實驗會因為壞境不同而存在多多少少的誤差
1. 10G的普通備份和壓縮備份
庫中有資料的資料塊大小一共為8865M。 
1.1  10G---普通備份
RMAN> run
 {
    allocate channel ch01 type disk;
    allocate channel ch02 type disk;
    allocate channel ch03 type disk;
    backup database format '/home/oracle/dbfull_%d_%T_%t_%s';
    release channel ch01;
    release channel ch02;
    release channel ch03;
 }
備份檔案大小:8196M  備份時間為:55s  cpu使用率:8%

1.2  10G---bzip2壓縮備份
RMAN> run
{
   allocate channel ch01 type disk;
   allocate channel ch02 type disk;
   allocate channel ch03 type disk;
   backup as compressed backupset full database  format '/home/oracle/dbfull-compreee-%U';
   release channel ch01;
   release channel ch02;
   release channel ch03;
}
備份檔案大小:5064M 備份時間:7:18分  cpu使用率:37%
2. 11R1的普通備份和壓縮備份
庫中有資料的資料塊大小一共為9639M。
1.1  11R1---普通備份
RMAN> run
 {
    allocate channel ch01 type disk;
    allocate channel ch02 type disk;
    allocate channel ch03 type disk;
    backup database format '/pmsdb/dbfull_%d_%T_%t_%s';
    release channel ch01;
    release channel ch02;
    release channel ch03;
 }
備份檔案大小:11169M  備份時間為:62s  cpu使用率:14%
2.2  11R1---bzip2壓縮備份
RMAN> CONFIGURE COMPRESSION ALGORITHM 'BZIP2';
RMAN> run
{
   allocate channel ch01 type disk;
   allocate channel ch02 type disk;
   allocate channel ch03 type disk;
   backup as compressed backupset full database  format '/pmsdb/dbfull-bzip2compreee-%U';
   release channel ch01;
   release channel ch02;
   release channel ch03;
}
備份檔案大小:1480M 備份時間:03:25分  cpu使用率:37%
2.3  11R1---ZLIB壓縮備份
RMAN> CONFIGURE COMPRESSION ALGORITHM 'ZLIB';
RMAN> run
{
   allocate channel ch01 type disk;
   allocate channel ch02 type disk;
   allocate channel ch03 type disk;
   backup as compressed backupset full database  format '/pmsdb/dbfull-zlibcompreee-%U';
   release channel ch01;
   release channel ch02;
   release channel ch03;
}
備份檔案大小:1310M 備份時間:01:30分  cpu使用率:34%
3. 11R2的普通備份和壓縮備份
庫中有資料的資料塊大小一共為8115M。
3.1  11R2---普通備份
RMAN> run
 {
    allocate channel ch01 type disk;
    allocate channel ch02 type disk;
    allocate channel ch03 type disk;
    backup database format '/pmsdb/oradata/dbfull_%d_%T_%t_%s';
    release channel ch01;
    release channel ch02;
    release channel ch03;
 }
備份檔案大小:7517M  備份時間為:01:27分  cpu使用率:2.9%
3.2  11R2---BASIC壓縮備份
RMAN> CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
RMAN> run
{
   allocate channel ch01 type disk;
   allocate channel ch02 type disk;
   allocate channel ch03 type disk;
   backup as compressed backupset full database  format '/pmsdb/oradata/dbfull-basiccompreee-%U';
   release channel ch01;
   release channel ch02;
   release channel ch03;
}
備份檔案大小:1148M 備份時間:04:45分  cpu使用率:14%
3.3  11R2---LOW壓縮備份
RMAN> CONFIGURE COMPRESSION ALGORITHM 'LOW';
RMAN> run
{
   allocate channel ch01 type disk;
   allocate channel ch02 type disk;
   allocate channel ch03 type disk;
   backup as compressed backupset full database  format '/pmsdb/oradata/dbfull-lowcompreee-%U';
   release channel ch01;
   release channel ch02;
   release channel ch03;
}
備份檔案大小:1649M 備份時間:01:47分  cpu使用率:8%
3.4  11R2---MEDIUM壓縮備份
RMAN> CONFIGURE COMPRESSION ALGORITHM 'MEDIUM';
RMAN> run
{
   allocate channel ch01 type disk;
   allocate channel ch02 type disk;
   allocate channel ch03 type disk;
   backup as compressed backupset full database  format '/pmsdb/oradata/dbfull-mediumcompreee-%U';
   release channel ch01;
   release channel ch02;
   release channel ch03;
}
備份檔案大小:1346M 備份時間:02:36分  cpu使用率:11%
3.5  11R2---HIGH壓縮備份
RMAN> CONFIGURE COMPRESSION ALGORITHM 'HIGH';
RMAN> run
{
   allocate channel ch01 type disk;
   allocate channel ch02 type disk;
   allocate channel ch03 type disk;
   backup as compressed backupset full database  format '/pmsdb/oradata/dbfull-highcompreee-%U';
   release channel ch01;
   release channel ch02;
   release channel ch03;
}
備份檔案大小:910M 備份時間:21:52分  cpu使用率:20%

不同版本下的rman壓縮備份

 
遇到的問題
RMAN>  CONFIGURE COMPRESSION ALGORITHM 'LOW';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 12/19/2013 09:29:18
RMAN-06806: compression algorithm 'LOW' of release DEFAULT not found
錯誤產生原因:
由於我的庫是11.1升級到11.2的,而且我並沒有修改 compatible='11.2.0.0.0',而是使用原來的 compatible為'11.1.0.0.0',可以通過檢視V$RMAN_COMPRESSION_ALGORITHM來看出:
11R1的V$RMAN_COMPRESSION_ALGORITHM:
SQL>  select * from V$RMAN_COMPRESSION_ALGORITHM;
ALGORITHM_ID ALGORITHM_NAME                 ALGORITHM_DESCRIPTION                    ALGORITHM_COMPATIB DATABASE_COMPATIBI IS_ IS_
------------ ------------------------------ ---------------------------------------- ------------------ ------------------ --- ---
           1 ZLIB                           optimized for speed                      11.0.0.0.0         11.1.0.0.0         YES NO
           0 BZIP2                          optimized for maximum compression        9.2.0.0.0          11.1.0.0.0         YES YES
這個是11R1的,這裡我寫出來只是為了區別升級前後這個試圖的變化。
11R2的V$RMAN_COMPRESSION_ALGORITHM(compatible此時為'11.1.0.0.0'):
 SQL> select ALGORITHM_NAME, INITIAL_RELEASE, TERMINAL_RELEASE, ALGORITHM_DESCRIPTION, IS_VALID, REQUIRES_ACO, IS_DEFAULT from V$RMAN_COMPRESSION_ALGORITHM;

ALGORITHM_ INITIAL_RELEASE    TERMINAL_RELEASE   ALGORITHM_DESCRIPTION                                            IS_ REQ IS_
---------- ------------------ ------------------ ---------------------------------------------------------------- --- --- ---
BZIP2      10.0.0.0.0         11.2.0.0.0         good compression ratio                                           YES NO  YES
BASIC      10.0.0.0.0                            good compression ratio                                           YES NO  NO
LOW        11.2.0.0.0                            maximum possible compression speed                               NO  YES NO
ZLIB       11.0.0.0.0         11.2.0.0.0         balance between speed and compression ratio                      YES YES NO
MEDIUM     11.2.0.0.0                            balance between speed and compression ratio                      YES YES NO
HIGH       11.2.0.0.0                            maximum possible compression ratio                               NO  YES NO
6 rows selected.
11R2的V$RMAN_COMPRESSION_ALGORITHM(compatible此時為'11.2.0.0.0'):
SQL> col ALGORITHM_NAME for a10
SQL> col INITIAL_RELEASE for a10
SQL> col TERMINAL_RELEASE for a10
SQL> col ALGORITHM_DESCRIPTION for a50
SQL> set linesize 200
SQL>  select ALGORITHM_NAME, INITIAL_RELEASE, TERMINAL_RELEASE, ALGORITHM_DESCRIPTION, IS_VALID, REQUIRES_ACO, IS_DEFAULT from V$RMAN_COMPRESSION_ALGORITHM;

ALGORITHM_ INITIAL_RE TERMINAL_R ALGORITHM_DESCRIPTION                              IS_ REQ IS_
---------- ---------- ---------- -------------------------------------------------- --- --- ---
BZIP2      10.0.0.0.0 11.2.0.0.0 good compression ratio                             YES NO  NO
BASIC      10.0.0.0.0            good compression ratio                             YES NO  YES
LOW        11.2.0.0.0            maximum possible compression speed                 YES YES NO
ZLIB       11.0.0.0.0 11.2.0.0.0 balance between speed and compression ratio        YES YES NO
MEDIUM     11.2.0.0.0            balance between speed and compression ratio        YES YES NO
HIGH       11.2.0.0.0            maximum possible compression ratio                 YES YES NO
6 rows selected.

然後再次執行RMAN>  CONFIGURE COMPRESSION ALGORITHM 'LOW';就不會報錯啦。

 


 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24500180/viewspace-1063760/,如需轉載,請註明出處,否則將追究法律責任。

相關文章