实验环境:
源端、目标端:
DataBase:10.2.0.1.0
OS:OEL5.6
OGG:fbo_ggs_Linux_x86_ora11g_32bit
源端使用rman进行备份全库:
RMAN> run{
ALLOCATE CHANNEL ch00 TYPE DISK MAXPIECESIZE 20G;
ALLOCATE CHANNEL ch01 TYPE DISK MAXPIECESIZE 20G;
CROSSCHECK BACKUPSET;
DELETE NOPROMPT EXPIRED BACKUPSET;
sql 'alter system archive log current';
BACKUP AS BACKUPSET SKIP INACCESSIBLE TAG hot_db_bk_level0 FORMAT '/home/oracle/bak//bk_%s_%p_%t' FULL DATABASE;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}2> 3> 4> 5> 6> 7> 8> 9> 10>
released channel: ORA_DISK_1
allocated channel: ch00
channel ch00: sid=141 devtype=DISK
allocated channel: ch01
channel ch01: sid=149 devtype=DISK
sql statement: alter system archive log current
Starting backup at 21-JUL-14
channel ch00: starting full datafile backupset
channel ch00: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/ORCL/system01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/ORCL/users01.dbf
input datafile fno=00005 name=/u01/app/oracle/oradata/ORCL/example01.dbf
channel ch00: starting piece 1 at 21-JUL-14
channel ch01: starting full datafile backupset
channel ch01: specifying datafile(s) in backupset
input datafile fno=00003 name=/u01/app/oracle/oradata/ORCL/sysaux01.dbf
input datafile fno=00006 name=/u01/app/oracle/oradata/ORCL/ogg01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/ORCL/undotbs01.dbf
channel ch01: starting piece 1 at 21-JUL-14
channel ch01: finished piece 1 at 21-JUL-14
piece handle=/home/oracle/bak/bk_23_1_853515593 tag=HOT_DB_BK_LEVEL0 comment=NONE
channel ch01: backup set complete, elapsed time: 00:00:35
channel ch01: starting full datafile backupset
channel ch01: specifying datafile(s) in backupset
including current control file in backupset
channel ch01: starting piece 1 at 21-JUL-14
channel ch01: finished piece 1 at 21-JUL-14
piece handle=/home/oracle/bak/bk_24_1_853515629 tag=HOT_DB_BK_LEVEL0 comment=NONE
channel ch01: backup set complete, elapsed time: 00:00:03
channel ch01: starting full datafile backupset
channel ch01: specifying datafile(s) in backupset
including current SPFILE in backupset
channel ch01: starting piece 1 at 21-JUL-14
channel ch01: finished piece 1 at 21-JUL-14
piece handle=/home/oracle/bak/bk_25_1_853515632 tag=HOT_DB_BK_LEVEL0 comment=NONE
channel ch01: backup set complete, elapsed time: 00:00:01
channel ch00: finished piece 1 at 21-JUL-14
piece handle=/home/oracle/bak/bk_22_1_853515593 tag=HOT_DB_BK_LEVEL0 comment=NONE
channel ch00: backup set complete, elapsed time: 00:01:15
Finished backup at 21-JUL-14
released channel: ch00
released channel: ch01
备份归档日志及控制文件,这里以有三组日志文件做例子,全部切一遍
RMAN> run{
ALLOCATE CHANNEL ch00 TYPE DISK MAXPIECESIZE 20G;
ALLOCATE CHANNEL ch01 TYPE DISK MAXPIECESIZE 20G;
sql 'alter system switch logfile';
sql 'alter system switch logfile';
sql 'alter system switch logfile';
sql 'alter system archive log current';
BACKUP ARCHIVELOG ALL FORMAT '/home/oracle/bak/ARCH_%U';
BACKUP CURRENT CONTROLFILE FORMAT '/home/oracle/bak/bk_controlfile';
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12>
allocated channel: ch00
channel ch00: sid=141 devtype=DISK
allocated channel: ch01
channel ch01: sid=149 devtype=DISK
sql statement: alter system switch logfile
sql statement: alter system switch logfile