Skip to main content
SnapManager Oracle

Cloning databases from backups

Contributors

You can clone a database from a backup by using the clone create command.

You must first create a clone specification file for the database. SnapManager creates the clone based on the information in this specification file.

You must give the clone a new Oracle system identifier (SID). You cannot run two databases with the same SID simultaneously on the same host. You can have a clone on a different host that uses the same SID. To designate a unique name for the clone, use -label. If you do not use this option, SnapManager creates a unique name for the clone that includes the SID, date, and time.

After you clone a database, you might want to update your tnsnames.ora files on your client machines with the new cloned database connection information. The tnsnames.ora files are used to connect to an Oracle instance without having to specify the full database information. SnapManager does not update the tnsnames.ora files.

SnapManager always creates a backup including archive log files, if you are using the profile created with -include-with-online-backups. SnapManager allows you to clone only the full database backups.

SnapManager (3.2 or later) allows you to clone the backups containing the data files and archive log files.

If the archive log is available from an external location, you can specify the external location during cloning for recovering the cloned database to a consistent state. You must ensure that the external location is accessible by Oracle. Cloning of the archive log-only backups is not supported.

Though the archive log backup is created along with the online partial backup, you cannot create a database clone by using this backup.

You can clone the database backup from the external archive log file location only for a stand-alone database.

The cloning of online database backup of the Real Application Clusters (RAC) database using the external archive log file location fails due to failure in recovery. This is because Oracle database fails to find and apply the archive log files for recovery from the external archive log location while cloning the database backup.

You can specify the -dump option as an optional parameter to collect the dump files after the successful or failed clone create operation.

Cloning datafile backup without archive log backup

When the data files backup does not include the archive log backup, SnapManager for Oracle clones the database based on the System Change Number (SCN) recorded during the backup. If the cloned database cannot be recovered, the Archived log file for thread <number> and change <SCN> required to complete recovery error message is displayed, even though SnapManager for Oracle continues to clone the database, and finally succeeds in creating the clone.

When cloning using the data files backup without including the archive log backup, SnapManager recovers the cloned database until the last archive log SCN, which is recorded during the backup.

  1. Create a clone specification file.

  2. To create a clone, enter the following command: smo clone create -backup-labelbackup_name-newsidnew_sid-labelclone_label-profileprofile_name-clonespecfull_path_to_clonespecfile [-taskspectaskspec] [-recover-from-location] path1 [,<path2>…​]][-dump]

Related information