Oracle 11g New Feature - Duplicating a Database Using 11g RMAN from Active Database Option without Any Backup - Oracle - DBA

Monday, 25 December 2017

Oracle 11g New Feature - Duplicating a Database Using 11g RMAN from Active Database Option without Any Backup

  1. Database in Archivelog Mode.
  2. Create Pfile from Target Database Spfile.
    •    Sql > create pfile=’C:\app\Parag\product\11.2.0\dbhome_1\database\initauxdb.ora' from spfile;  
  3. 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  
  4. 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  
      1. 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. Create net service name for database auxdb with name say auxdb.
        2. Add static database service name to listener using net manager
        3. Minimum one archivelog is required to make this duplication successful. 
          •    C:\set ORACLE_SID=orcl   
               C:\sqlplus / as sysdba   
               SQL> alter system switch logfile;  
        4. 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 sys/admin@auxdb
                 RMAN> connect target sys/admin@orcl  
                 RMAN> Duplicate target database to auxdb from Active Database;  
          2. If all steps are done correctly you will have a new database clone created successfully.

          No comments:

          Post a Comment

          Total Pageviews