Oracle Database 11g New Feature - Backup-Based Duplication Without a Target Connection or Recovery Catalog Connection
Oracle 11g New Feature - Duplicating a Oracle Database Using 11g RMAN Backup Location Option but Without Connection to Target or Recovery Catalog
We have Target Database name as ORCL
And we are creating a duplicate database using RMAN Auxiliary Instance with name as AUXDB by using the backup location but without making connection to target database and recovery catalog database while the duplication process is running.
Note :- This practical need same directory structures and it is performed on same server. Just the database name is different so we are converting the path with respect to dbname only.
Image Source - docs.oracle.com
- Your Target Database can be in any log mode.
- Take RMAN Backup based on your Database Log Mode.
A) Archivelog Mode - Take a Whole Hot Backup C:\set ORACLE_SID=orcl C:\rman target / RMAN> backup database plus archivelog; B) Noarchivelog Mode - Take a Whole Cold Backup C:\set ORACLE_SID=orcl C:\rman target / RMAN>run { shutdown immediate startup mount backup database; }
- Create Pfile from Target Database Spfile
- Open pfile with notepad and replace (Ctrl + H) all orcl to auxdb except for parameter except local_listener.
- On Windows Platform You need to Create a new Instance for auxdb which also creates a password file for the same.
- Create All the folders in Oracle Folder Structures.
- Connect to auxdb and startup instance at nomount stage.
- Now set these two parameters to convert your datafiles and logfile names.
- Now you need to connect Recovery Manager to start the duplicating (cloning) process.
- If all steps are done correctly you will have a new database clone created successfully without any connection made to target and catalog database. But you need recovery manager backup for this scenario.
C:\set ORACLE_SID=orcl
C:\sqlplus / as sysdba
SQL> create pfile='C:\app\Administrator\product\11.2.0\dbhome_1\database\initauxdb.ora' from spfile;
SQL> host notepad C:\app\Administrator\product\11.2.0\dbhome_1\database\initauxdb.ora
SQL> host oradim -new -sid auxdb -syspwd admin
SQL> host mkdir C:\app\Administrator\oradata\auxdb
SQL> host mkdir C:\app\Administrator\flash_recovery_area\auxdb
SQL> host mkdir C:\app\Administrator\admin\auxdb
SQL> host mkdir C:\app\Administrator\admin\auxdb\adump
SQL> host mkdir C:\app\Administrator\admin\auxdb\dpdump
SQL> host mkdir C:\app\Administrator\admin\auxdb\pfile
C:\set ORACLE_SID=auxdb
C:\sqlplus / as sysdba
SQL> startup nomount //Instance started with pfile
SQL> create spfile from pfile;
SQL> shut immediate
SQL> startup nomount //Instance started with spfile now
SQL> show parameter convert
SQL> alter system set db_file_name_convert = 'orcl','auxdb' scope=spfile;
SQL> alter system set log_file_name_convert = 'orcl','auxdb' scope=spfile;
SQL> shut immediate
SQL> startup nomount
C:\set ORACLE_SID=auxdb
C:\>rman auxiliary sys/admin@auxdb
RMAN> duplicate database to auxdb BACKUP LOCATION 'C:\app\Administrator\flash_recovery_area\orcl'
Comments
Post a Comment