Creating Duplicate Database from RMAN Using the Backups done at OS level Doc ID 419144.1
Oracle Database - Enterprise Edition - Version 9.2.0.1 and later
Oracle Database Cloud Schema Service - Version N/A and later Oracle Database Exadata Express Cloud Service - Version N/A and later Oracle Database Exadata Cloud Machine - Version N/A and later Oracle Cloud Infrastructure - Database Service - Version N/A and later Information in this document applies to any platform.
GOAL
This note explains creation of Duplicate database from Rman using the backups that are done at OS level .
The backup that is used in the example is a cold backup of the database
SOLUTION
NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample schema(s), Public Documentation delivered with an Oracle database product or other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.
For the purposes of this document, the following fictitious environment is used as an example to describe the procedure:
# +----------------------------------------+ # | FILE : initAUX.ora | # | DATABASE NAME : AUX | # +----------------------------------------+ # Set the below to location of the clone Duplicate database / name of # clone database. audit_file_dest =/oradata/aux/adump background_dump_dest =/oradata/aux/bdump core_dump_dest =/oradata/aux/cdump user_dump_dest =/oradata/aux/udump db_name ="AUX" instance_name =AUX # Set the below to the location of the duplicate clone control file. control_files ='/home/oracle/aux/c1.ctl' # Set the below for the from and to location for all data files / redo # logs to be cloned. log_file_name_convert=('/home/oracle/PROD/redo/','/home/oracle/aux/') db_file_name_convert=('/home/oracle/PROD/data/','/home/oracle/aux/') #Set the below to the same as the production target undo_management =AUTO undo_retention =10800 undo_tablespace =UNDOTBS1 db_block_size = < > compatible = 9.2.0
6) Startup nomount the auxiliary database
$ export ORACLE_SID=aux1
$ sqlplus "/as sysdba"
SQL> Startup nomount
7) Now connect to target,catalog and auxiliary instances from Rman
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: PROD (DBID=4282295901)
connected to recovery catalog database
connected to auxiliary database: aux1 (not mounted)
8) Perform a log switch
RMAN> sql 'alter system switch logfile';
sql statement: alter system switch logfile
9) Perform the duplicate
RMAN> duplicate target database to aux1;
Please note:In 11gr2 there is an option to create RMAN duplicate without connecting to target and catalog with a BACKUP LOCATION pointing to disk backup.
You can explore using this option in 11gr2 which is applicable even for datafile copy RMAN 11GR2 : DUPLICATE Without Target And Recovery Catalog Connection Note 874352.1