Oracle 11g 數(shù)據(jù)庫(kù)rman壓縮備份壓縮率測(cè)試

此測(cè)試不從時(shí)間維度比較,只從存儲(chǔ)空間維度進(jìn)行簡(jiǎn)要比較。 –操作系統(tǒng)環(huán)境 [oracle@11grac1 ~]$ uname -a Linux 11grac1 2.6.32-300.10.1.el5uek #1 SMP Wed Feb 22 17:22:40 EST 2012 i686 i686 i386 GNU/Linux –數(shù)據(jù)庫(kù)環(huán)境 SQL set pagesize 200- SQL col

此測(cè)試不從時(shí)間維度比較,只從存儲(chǔ)空間維度進(jìn)行簡(jiǎn)要比較。
–操作系統(tǒng)環(huán)境
[Oracle@11grac1 ~]$ uname -a
Linux 11grac1 2.6.32-300.10.1.el5uek #1 SMP Wed Feb 22 17:22:40 EST 2012 i686 i686 i386 GNU/Linux
–數(shù)據(jù)庫(kù)環(huán)境
SQL> set pagesize 200-

SQL> col BANNER for a60
SQL> select * from gv$version where rownumOracle Database 11g Enterprise Edition Release 11.2.0.1.0 –
?????????? Production
???????? 1 PL/SQL Release 11.2.0.1.0 – Production
???????? 1 CORE 11.2.0.1.0????? Production
???????? 1 TNS for Linux: Version 11.2.0.1.0 – Production
???????? 1 NLSRTL Version 11.2.0.1.0 – Production
???????? 2 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 –
?????????? Production
???????? 2 PL/SQL Release 11.2.0.1.0 – Production
???????? 2 CORE 11.2.0.1.0????? Production
???????? 2 TNS for Linux: Version 11.2.0.1.0 – Production
???????? 2 NLSRTL Version 11.2.0.1.0 – Production
–數(shù)據(jù)庫(kù)歸檔情況
SQL> archive log list;
Database log mode????????????? Archive Mode
Automatic archival???????????? Enabled
Archive destination??????????? USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence???? 2
Next log sequence to archive?? 3
Current log sequence?????????? 3
SQL> show parameter cluster_database;
NAME???????????????????????????????? TYPE??????? VALUE
———————————— ———– ——————————
cluster_database???????????????????? boolean???? TRUE
cluster_database_instances?????????? integer???? 2
–數(shù)據(jù)庫(kù)當(dāng)前大小
SQL> select sum(bytes)/1024/1024 m from dba_data_files;
???????? M
———-
????? 1195
–rman參數(shù)配置
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name RACDB are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM ‘AES128’; # default
CONFIGURE COMPRESSION ALGORITHM ‘BASIC’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘/u01/app/Oracle/product/11.2.0/db_1/dbs/snapcf_racdb1.f’; # default
–執(zhí)行壓縮備份腳本(只備份數(shù)據(jù)庫(kù))
RMAN> run {
2> allocate channel c1 type disk maxpiecesize=512m;
3> allocate channel c2 type disk maxpiecesize=512m;
4> backup as compressed backupset database format ‘/u01/app/backup/db_full_%U_%p_%T_%s.bak’ tag ‘dbl0’;
5> backup current controlfile format ‘/u01/app/backup/contorlfile_%T_%U_%s.ctlbak’;
release channel c1;
6> 7> release channel c2;
8> }
released channel: ORA_DISK_1
released channel: ORA_DISK_2
allocated channel: c1
channel c1: SID=32 instance=racdb1 device type=DISK
allocated channel: c2
channel c2: SID=57 instance=racdb1 device type=DISK
Starting backup at 13-SEP-12
channel c1: starting compressed full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/racdb/system01.dbf
input datafile file number=00004 name=+DATA/racdb/users01.dbf
channel c1: starting piece 1 at 13-SEP-12
channel c2: starting compressed full datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA/racdb/sysaux01.dbf
input datafile file number=00003 name=+DATA/racdb/undotbs01.dbf
input datafile file number=00005 name=+DATA/racdb/undotbs02.dbf
channel c2: starting piece 1 at 13-SEP-12
channel c2: finished piece 1 at 13-SEP-12
piece handle=/u01/app/backup/db_full_08nl4lf6_1_1_1_20120913_8.bak tag=DBL0 comment=NONE
channel c2: backup set complete, elapsed time: 00:03:26
channel c1: finished piece 1 at 13-SEP-12
piece handle=/u01/app/backup/db_full_07nl4lf6_1_1_1_20120913_7.bak tag=DBL0 comment=NONE
channel c1: backup set complete, elapsed time: 00:04:27
Finished backup at 13-SEP-12
Starting backup at 13-SEP-12
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
including current control file in backup set
channel c1: starting piece 1 at 13-SEP-12
channel c1: finished piece 1 at 13-SEP-12
piece handle=/u01/app/backup/contorlfile_20120913_09nl4lnq_1_1_9.ctlbak tag=TAG20120913T224930 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:03
Finished backup at 13-SEP-12
Starting Control File and SPFILE Autobackup at 13-SEP-12
piece handle=+DATA/racdb/autobackup/2012_09_13/s_793925381.271.793925387 comment=NONE
Finished Control File and SPFILE Autobackup at 13-SEP-12
released channel: c1
released channel: c2
–查看備份大小
[Oracle@11grac1 backup]$ pwd
/u01/app/backup
[Oracle@11grac1 backup]$ ls
contorlfile_20120913_09nl4lnq_1_1_9.ctlbak? db_full_08nl4lf6_1_1_1_20120913_8.bak
db_full_07nl4lf6_1_1_1_20120913_7.bak
[Oracle@11grac1 backup]$ du -sh
269M??? .
–執(zhí)行非壓縮備份腳本(只備份數(shù)據(jù)庫(kù))
RMAN> run {
2> allocate channel c1 type disk maxpiecesize=512m;
3> allocate channel c2 type disk maxpiecesize=512m;
4> backup as backupset database format ‘/u01/app/backup/db_full_%U_%p_%T_%s.bak’ tag ‘dbl0’;
5> backup current controlfile format ‘/u01/app/backup/contorlfile_%T_%U_%s.ctlbak’;
6> release channel c1;
7> release channel c2;
}8>
released channel: ORA_DISK_1
released channel: ORA_DISK_2
allocated channel: c1
channel c1: SID=32 instance=racdb1 device type=DISK
allocated channel: c2
channel c2: SID=57 instance=racdb1 device type=DISK
Starting backup at 13-SEP-12
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/racdb/system01.dbf
input datafile file number=00004 name=+DATA/racdb/users01.dbf
channel c1: starting piece 1 at 13-SEP-12
channel c2: starting full datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA/racdb/sysaux01.dbf
input datafile file number=00003 name=+DATA/racdb/undotbs01.dbf
input datafile file number=00005 name=+DATA/racdb/undotbs02.dbf
channel c2: starting piece 1 at 13-SEP-12
channel c1: finished piece 1 at 13-SEP-12
piece handle=/u01/app/backup/db_full_0bnl4lsf_1_1_1_20120913_11.bak tag=DBL0 comment=NONE
channel c1: starting piece 2 at 13-SEP-12
channel c1: finished piece 2 at 13-SEP-12
piece handle=/u01/app/backup/db_full_0bnl4lsf_2_1_2_20120913_11.bak tag=DBL0 comment=NONE
channel c1: backup set complete, elapsed time: 00:02:42
channel c2: finished piece 1 at 13-SEP-12
piece handle=/u01/app/backup/db_full_0cnl4lsg_1_1_1_20120913_12.bak tag=DBL0 comment=NONE
channel c2: backup set complete, elapsed time: 00:02:51
Finished backup at 13-SEP-12
Starting backup at 13-SEP-12
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
including current control file in backup set
channel c1: starting piece 1 at 13-SEP-12
channel c1: finished piece 1 at 13-SEP-12
piece handle=/u01/app/backup/contorlfile_20120913_0dnl4m21_1_1_13.ctlbak tag=TAG20120913T225456 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:03
Finished backup at 13-SEP-12
Starting Control File and SPFILE Autobackup at 13-SEP-12
piece handle=+DATA/racdb/autobackup/2012_09_13/s_793925708.270.793925713 comment=NONE
Finished Control File and SPFILE Autobackup at 13-SEP-12
released channel: c1
released channel: c2
–查看備份大小
[Oracle@11grac1 backup]$ rm -rf *
[Oracle@11grac1 backup]$ du -sh
969M??? .
–11g壓縮備份效率比較
是否壓縮備份??????? 壓縮備份(單位M)??????? 非壓縮備份(單位M)??????????? 比率
庫(kù)大小??????????????????? 1195????????????????????????????????? 1195???????????????????????????????????????? 1
備份文件大小??????? 269??????????????????????????????????? 969?????????????????????????????????????????? 3.6
比率??????????????????????? 0.23?????????????????????????????????? 0.81????????????????????????????????????????? 3.52

? 版權(quán)聲明
THE END
喜歡就支持一下吧
點(diǎn)贊8 分享