Professional Documents
Culture Documents
In this Document
Goal
Solution
References
Applies to:
Oracle Server - Enterprise Edition - Version: 11.2.0.2 to 11.2.0.2 - Release: 11.2 to
11.2
Information in this document applies to any platform.
Goal
The following note guides a DBA in performing an RMAN duplicate to a new server
without connecting to the target database or a recovery catalog.
This is an Oracle 11g Release 2 feature called 'backup-based duplication' and is only
connecting to the Auxiliary instance, while prior versions required a connection to the
TARGET and optional to the RMAN-catalog.
Solution
1) In order to be able to perform a duplicate of the target DB you must first have a
backup of the database you wish to duplicate.
Note: If you have not backed up your archivelogs recently it may be a good idea to
take a backup as previous archivelogs to this backup will not be required in this
backupset.
In the steps below we ensure an autobackup of the controlfile is taken and only
archivelogs that have not been backed up 1 time are included.
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN> backup database plus archivelog not backed up 1 times;
Starting backup at 2009/08/19 08:35:28
current log archived
released channel: ORA_SBT_TAPE_1
using channel ORA_DISK_1
skipping archived log file /u01/app/oracle/flash_recovery_area/V11/ar
chivelog/20
09_08_18/o1_mf_1_27_58nd798o_.arc; already backed up 1 time(s)
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=28 RECID=28 STAMP=695260837
input archived log thread=1 sequence=29 RECID=29 STAMP=695291729
channel ORA_DISK_1: starting piece 1 at 2009/08/19 08:35:30
channel ORA_DISK_1: finished piece 1 at 2009/08/19 08:35:37
piece handle=/u01/app/oracle/flash_recovery_area/V11/backupset/2009_0
8_19/o1_mf_
annnn_TAG20090819T083530_58pc5llk_.bkp tag=TAG20090819T083530 comment
=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 2009/08/19 08:35:37
Starting backup at 2009/08/19 08:35:37
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=/oradata/v11/sysaux01.dbf
input datafile file number=00001 name=/oradata/v11/system01.dbf
input datafile file number=00003 name=/oradata/v11/undo01.dbf
input datafile file number=00005 name=/oradata/v11/example01.dbf
input datafile file number=00004 name=/oradata/v11/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2009/08/19 08:35:38
channel ORA_DISK_1: finished piece 1 at 2009/08/19 08:37:13
piece handle=/u01/app/oracle/flash_recovery_area/V11/backupset/2009_0
8_19/o1_mf_
nnndf_TAG20090819T083537_58pc5tb6_.bkp tag=TAG20090819T083537 comment
=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:35
Finished backup at 2009/08/19 08:37:13
Starting backup at 2009/08/19 08:37:13
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=30 RECID=30 STAMP=695291833
channel ORA_DISK_1: starting piece 1 at 2009/08/19 08:37:14
channel ORA_DISK_1: finished piece 1 at 2009/08/19 08:37:15
piece handle=/u01/app/oracle/flash_recovery_area/V11/backupset/2009_0
8_19/o1_mf_
annnn_TAG20090819T083713_58pc8t18_.bkp tag=TAG20090819T083713 comment
=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2009/08/19 08:37:15
Starting Control File and SPFILE Autobackup at 2009/08/19 08:37:15
piece handle=/u01/app/oracle/flash_recovery_area/V11/autobackup/2009_
08_19/o1_mf
_s_695291835_58pc8w10_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2009/08/19 08:37:18
RMAN>
2) Copy the backupsets from above to your auxiliary server.
Example:
/u01/app/oracle/flash_recovery_area/V11/backupset/2009_08_19/o1_mf_
annnn_TAG20090819T083530_58pc5llk_.bkp
/u01/app/oracle/flash_recovery_area/V11/backupset/2009_08_19/o1_mf_
nnndf_TAG20090819T083537_58pc5tb6_.bkp
/u01/app/oracle/flash_recovery_area/V11/backupset/2009_08_19/o1_mf_
annnn_TAG20090819T083713_58pc8t18_.bkp
/u01/app/oracle/flash_recovery_area/V11/autobackup/2009_08_19/o1_mf
_s_695291835_58pc8w10_.bkp
% scp * aulnxdv2:/recovery_area/
-rw-rw---- 1
95744 Aug 19 09:18 o1_mf_annnn_TAG20090819T083713_58pc8t18_.bkp
-rw-rw---- 1
69371392 Aug 19 09:18 o1_mf_annnn_TAG20090819T083530_58pc5llk_.bkp
-rw-rw---- 1
1466580992 Aug 19 09:19 o1_mf_nnndf_TAG20090819T083537_58pc5tb6_.bkp
-rw-rw---- 1 10059776 Aug 19 09:22 o1_mf_s_695291835_58pc8w10_.bkp
All files generated in the backup have successfully been copied across to the new
server.
4)
RMAN will use the parameter BACKUP LOCATION to look for any backups.
The most recent datafile and archivelog backups will than restore and recovered.
Note you are also able to use SET UNTIL TIME if required.
Once the duplicate is complete it will open with a resetlogs. At the end of a successful
duplicate the DBID is changed.
Reference:
<
http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmdupdb.htm#s
thref1824 >
.
Oracle Database Backup and Recovery User's Guide
11g Release 2 (11.2)
Part Number E10642-04
.
Chapter 24 Duplicating a Database
.
References
http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmdupdb.htm
Related
Products
Oracle Database Products > Oracle Database > Oracle Database > Oracle
Server - Enterprise Edition
Back to top