Environment:
Source Server:
VM7.14 rhel5.5-32 Oracle 11.2.0.0g
172.16.3.202
Target Server
VM7.14 rhel5.5-32 oracle 11.2.0.0g
172.16.3.204
Source Server
1. Add verification tables and data to the database:
[Oracle @ ebs01 ~] $ Sqlplus "/as sysdba"
SQL * Plus: Release 11.2.0.1.0 Production on Sun Jun 10 13:09:43 2012
Copyright (c) 1982,200 9, Oracle. All rights reserved.
Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create table addr1 (city varchar (20), phone number );
Table created.
SQL> insert into addr1 values ('beijing', 1580118 );
1 row created.
SQL> insert into addr1 values ('shanghai', 1501005 );
1 row created.
SQL> insert into addr1 values ('nanjing', 1598888 );
1 row created.
SQL> commit;
Commit complete.
SQL> select * from addr;
CITY PHONE
------------------------------
Beijing 1.5801E + 10
Shanghai 1.5010E + 10
Nanjing 1.5988E + 10
2. Clear the backup directory or create a new one and back up necessary files.
[Oracle @ ebs01 ~] $ Cd/u01/backup
[Oracle @ ebs01 backup] $ rm *
1) Start backup and back up data files together with archive logs:
[Oracle @ ebs01 backup] $ rman target/
Recovery Manager: Release 11.2.0.1.0-Production on Mon Jun 11 09:16:52 2012
Copyright (c) 1982,200 9, Oracle and/or its affiliates. All rights reserved.
Connected to target database: ORCL (DBID = 1290854593)
RMAN> run {
Allocate channel c1 device type disk;
Allocate channel c2 device type disk;
Backup incremental level 0
Format '/u01/backup/db_full _ % U. bkp'
Tag '2017-06-11-full'
Database plus archivelog;
Release channel c1;
Release channel c2;
} 2> 3> 4> 5> 6> 7> 8> 9> 10>
Using target database control file instead of recovery catalog
Allocated channel: c1
Channel c1: SID = 41 device type = DISK
Allocated channel: c2
Channel c2: SID = 28 device type = DISK
Starting backup at 11-JUN-12
Current log archived
Channel c1: starting archived log backup set
Channel c1: specifying archived log (s) in backup set
Input archived log thread = 1 sequence = 19 RECID = 1 STAMP = 784809253
Input archived log thread = 1 sequence = 20 RECID = 2 STAMP = 784809551
Input archived log thread = 1 sequence = 21 RECID = 3 STAMP = 785592038
Channel c1: starting piece 1 at 11-JUN-12
Channel c2: starting archived log backup set
Channel c2: specifying archived log (s) in backup set
Input archived log thread = 1 sequence = 22 RECID = 4 STAMP = 785592147
Input archived log thread = 1 sequence = 23 RECID = 5 STAMP = 785595880
Channel c2: starting piece 1 at 11-JUN-12
Channel c1: finished piece 1 at 11-JUN-12
Piece handle =/u01/backup/db_full_0mnd8mo1_1_1.bkp tag = 2012-06-11-FULL comment = NONE
Channel c1: backup set complete, elapsed time: 00:00:08
Channel c1: starting archived log backup set
Channel c1: specifying archived log (s) in backup set
Input archived log thread = 1 sequence = 24 RECID = 6 STAMP = 785668864
Channel c1: starting piece 1 at 11-JUN-12
Channel c2: finished piece 1 at 11-JUN-12
Piece handle =/u01/backup/db_full_0nnd8mo1_1_1.bkp tag = 2012-06-11-FULL comment = NONE
Channel c2: backup set complete, elapsed time: 00:00:08
Channel c1: finished piece 1 at 11-JUN-12
Piece handle =/u01/backup/db_full_0ond8mo9_00001.bkp tag = 2012-06-11-FULL comment = NONE
Channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 11-JUN-12
Starting backup at 11-JUN-12
Channel c1: starting incremental level 0 datafile backup set
Channel c1: specifying datafile (s) in backup set
Input datafile file number = 00001 name =/u01/app/oracle/oradata/orcl/system01.dbf
Input datafile file number = 00005 name =/u01/app/oracle/oradata/orcl/example01.dbf
Channel c1: starting piece 1 at 11-JUN-12
Channel c2: starting incremental level 0 datafile backup set
Channel c2: specifying datafile (s) in backup set
Input datafile file number = 00002 name =/u01/app/oracle/oradata/orcl/sysaux01.dbf
Input datafile file number = 00003 name =/u01/app/oracle/oradata/orcl/undotbs01.dbf
Input datafile file number = 00004 name =/u01/app/oracle/oradata/orcl/users01.dbf
Channel c2: starting piece 1 at 11-JUN-12
Channel c2: finished piece 1 at 11-JUN-12
Piece handle =/u01/backup/db_full_0qnd8mob_00001.bkp tag = 2012-06-11-FULL comment = NONE
Channel c2: backup set complete, elapsed time: 00:00:56
Channel c2: starting incremental level 0 datafile backup set
Channel c2: specifying datafile (s) in backup set
Including current control file in backup set
Channel c2: starting piece 1 at 11-JUN-12
Channel c2: finished piece 1 at 11-JUN-12
Piece handle =/u01/backup/db_full_0rnd8mq4_00001.bkp tag = 2012-06-11-FULL comment = NONE
Channel c2: backup set complete, elapsed time: 00:00:09
Channel c2: starting incremental level 0 datafile backup set
Channel c2: specifying datafile (s) in backup set
Including current SPFILE in backup set
Channel c2: starting piece 1 at 11-JUN-12
Channel c2: finished piece 1 at 11-JUN-12
Piece handle =/u01/backup/db_full_0snd8mqs_00001.bkp tag = 2012-06-11-FULL comment = NONE
Channel c2: backup set complete, elapsed time: 00:00:07
Channel c1: finished piece 1 at 11-JUN-12
Piece handle =/u01/backup/db_full_0pnd8mob_00001.bkp tag = 2012-06-11-FULL comment = NONE
Channel c1: backup set complete, elapsed time: 00:01:48
Finished backup at 11-JUN-12
Starting backup at 11-JUN-12
Current log archived
Channel c1: starting archived log backup set
Channel c1: specifying archived log (s) in backup set
Input archived log thread = 1 sequence = 25 RECID = 7 STAMP = 785668983
Channel c1: starting piece 1 at 11-JUN-12
Channel c1: finished piece 1 at 11-JUN-12
Piece handle =/u01/backup/db_full_0tnd8mro_1_1.bkp tag = 2012-06-11-FULL comment = NONE
Channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 11-JUN-12
Released channel: c1
Released channel: c2
2) back up the current control file:
RMAN> backup current controlfile format '/u01/backup/controlfile20120611.bak ';
Starting backup at 11-JUN-12
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID = 41 device type = DISK
Channel ORA_DISK_1: starting full datafile backup set
Channel ORA_DISK_1: specifying datafile (s) in backup set
Including current control file in backup set
Channel ORA_DISK_1: starting piece 1 at 11-JUN-12
Channel ORA_DISK_1: finished piece 1 at 11-JUN-12
Piece handle =/u01/backup/controlfile20120611.bak tag = TAG20120611T093224 comment = NONE
Channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 11-JUN-12
3) backup parameter files
RMAN> backup spfile format '/u01/backup/spfile20120611.bak ';
Starting backup at 11-JUN-12
Using channel ORA_DISK_1
Channel ORA_DISK_1: starting full datafile backup set
Channel ORA_DISK_1: specifying datafile (s) in backup set
Including current SPFILE in backup set
Channel ORA_DISK_1: starting piece 1 at 11-JUN-12
Channel ORA_DISK_1: finished piece 1 at 11-JUN-12
Piece handle =/u01/backup/spfile20120611.bak tag = TAG20120611T093402 comment = NONE
Channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 11-JUN-12
RMAN>