Creating Oracle Duplicate, Clone, Sandbox Database in 10g and 11g Using RMAN WithTarget connection - Oracle - DBA

Monday, 25 December 2017

Creating Oracle Duplicate, Clone, Sandbox Database in 10g and 11g Using RMAN WithTarget connection


  1. Database In Archive log mode.
  2. Take Whole Hot/Cold Backup of Target Database.
    •    Rman > Backup Database plus archivelog;  
  3. Create Pfile from Target Database Spfile.
    •    Sql > create pfile=’C:\app\Parag\product\11.2.0\dbhome_1\database\initauxdb.ora' from spfile;  
  4. Open Pfile with notepad and Replace (Ctrl + H) all Orcl to Auxdb except Listener_ORCl.
    •   Sql > host notepad C:\app\Parag\product\11.2.0\dbhome_1\database\initauxdb.ora  
  5. On windows platform you need to create a new instance for Auxdb with also creates an password file for the same.
    •    Sql > host oradim -new -sid auxdb -syspwd admin  
    1. Create all the folders in Oracle Folder Strectures.
      •    SQL> host mkdir C:\app\Parag\oradata\auxdb  
           SQL> host mkdir C:\app\Parag\flash_recovery_area\AUXDB  
           SQL> host mkdir C:\app\Parag\admin\auxdb  
           SQL> host mkdir C:\app\Parag\admin\auxdb\adump  
           SQL> host mkdir C:\app\Parag\admin\auxdb\dpdump  
           SQL> host mkdir C:\app\Parag\admin\auxdb\pfile  
    2. Connect to Auxdb and Startup Instance in nomount Stage.
      •    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  
      1. Now set these two parameters to convert your datafiles and logfile names.
        •    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  
        1. Now you need to convert Recovery Manager to Start the Duplicating (Cloning)Process.
          •    C:\> set ORACLE_SID=auxdb  
               C:\> rman auxiliary /  
               RMAN> connect target sys/admin@orcl  
               RMAN> Duplicate target database to auxdb;  
             
        2. If all steps are done correctly you will have a new database clone created successfully.

        1 comment:

        Total Pageviews