Oracle 11g New Feature - Duplicating a Database Using 11g RMAN From Active Database Option without ANY BACKUP

Oracle 11g New Feature - Duplicating a Database Using 11g RMAN From Active Database Option without ANY BACKUP

We have Target Database name as ORCL

And we are creating a Auxiliary database with name as AUXDB 

Image Source - docs.oracle.com


  1. Check log_mode of Target Database. Target must be in archivelog mode. Otherwise put the database in archivelog mode.
  2.  shutdown immediate
     startup mount
     alter database archivelog;
     alter database open;
    

  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 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. Create net service name for database auxdb with name say auxdb.

  12. Add static database service name to listener using net manager.

  13. Minimum one archivelog is required to make this duplication successful.
  14.  
     C:\set ORACLE_SID=orcl  
     C:\sqlplus / as sysdba  
     SQL> alter system switch logfile;  
    


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


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

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


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

  20.   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;  
    

     
  21. If all steps are done correctly you will have a new database clone created successfully without any RMAN Backup.

Comments

Post a Comment

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