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


  1. Your Target Database can be in any log mode.
  2. 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;  
     }  
    
  3. Create Pfile from Target Database Spfile
  4.  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;   
    

  5. Open pfile with notepad and replace (Ctrl + H) all orcl to auxdb except for parameter except local_listener.

  6.  SQL> host notepad C:\app\Administrator\product\11.2.0\dbhome_1\database\initauxdb.ora  
    


  7. On Windows Platform You need to Create a new Instance for auxdb which also creates a password file for the same.

  8.  SQL> host oradim -new -sid auxdb -syspwd admin  
    


  9. Create All the folders in Oracle Folder Structures.
  10.  
     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   
    

  11. Connect to auxdb and startup instance at nomount stage.
  12.  
     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  
    


  13. Now set these two parameters to convert your datafiles and logfile names.

  14.  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  
    


  15. Now you need to connect Recovery Manager to start the duplicating (cloning) process.

  16.   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'
    

     
  17. 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.

Comments

Popular posts from this blog

Oracle Architecture - Explained In Detailed - Administration I

Oracle Database SQL - Practise - Question - Scott Schema Examples

Step by Step - How to resolve redo log file corruption using ALTER DATABASE CLEAR UNARCHIVED LOGFILE command