Question

Difference between oracle duplicate and restore out of place

  • 23 August 2023
  • 5 replies
  • 824 views

Badge +1

Can anyone explain  to me what is the difference between “Duplicate” and “Restore out of place” for oracle databases? Isn’t it the same thing? It does restore data from a specific backup to a specific server/oracle instance. I still can’t undestand when to use one option over the other. Thanks to anyone that can explain. 


5 replies

Badge +3

Hello Abdou,

Both restores the data either in same server or in a different server.

The only difference is duplicate will create a Control file according to the destination DB in the destination machine.

I out of place it restores the control file from the source DB backup and at the end of restore Commvault changes the target name in the control file.

Regards,

Karthikeyan K

Badge +1

Hi there,

so it does the same thing but in a different way, correct? Can you give me an example for when I must use a Duplicate  instead of an out of place restore? I don’t know if you can confirm this, but the duplicate is more problematic than out of place restores. Thank you for you answer.

Badge +1

@Abdou Hi,

 

A duplicate (auxiliary) database is a copy or a subset of the target database and has a unique DBID. It is independent of the primary database and can be registered in the same recovery catalog as the primary database. The duplicate database is useful for testing , demonstration, reporting and other non prod activities. 

 

Where as ‘out of place oracle restore’ helps us to restore the oracle database to a different location or server than the original, it allows to recover data without affecting the production environment, restored database will have the same DBID as the original, maintaining its identity in the oracle ecosystem. Out of place restore will often used for DR or corruption recovery situations.

 

In summary, the main difference of these two approaches lie in their behavior of the restored or duplicated DB,  the key difference is  the DBID.

 

 

Userlevel 4
Badge +12

Hi @Abdou 

 

For duplicate DB, we rely on the oracle duplicate database functionality which has certain pre-requirements like creating a Auxiliary database, defining TNS connect string towards the target database (source) or a catalog database etc. You would definitely require connectivity towards the target database (source DB) or to a catalog db to perform a duplicate DB restore. You have an option to perform a duplicate db either from the backup or from the active database. Duplicate DB is supported to a database on the same host or a different host with a different db name. Duplicate DB is also used to create standby DB to configure a data guard setup.

 

Cross machine / out of place restore are supported to a database with the same name or different name on a different host. This restore do not need connection to the source database and catalog is option (may need catalog based on the restore scenario). Cross machine/out of place restores are not allowed on the same host. In case if the destination database name is different from the source, we utilize oracle NID utility to rename the database at the end after the entire database is restored and recovered. Corss machine / out of place restore could be utilized in a DR site scenario where the DR site is isolate from the production environment where you do not have network connectivity towards the source or the catalog db.  

 

Duplicate db might be complicated as it has few pre-requirements before performing the restore and most restore run into issues if they are not met. As I mentioned earlier we rely on RMAN for duplicate db, after we trigger the duplicate command oracle takes over and performs the restore and recover and we will have less control to troubleshoot if we run into any issues during the restore and may need to restart the restore from beginning but we/dba’s will have more control and could troubleshoot and resume the restore or manually recover if needed.  

 

Let me know in case of any other questions.

 

Regards,

Gowri Shankar

 

Badge +1

Hi, 

thank you all for the answers. It is very helpful.

 

Reply