Skip to main content
SnapManager for SAP

Clone databases from backups


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

About this task

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

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.

When you specify the external archive log locations for recovering the cloned database to a consistent state, you must ensure that you include the external location names completely in uppercase. In the file system, the names of all the folders and subfolders must be in uppercase because the Oracle database translates the destination path to uppercase and expects the external destination paths, folder names, and subfolder names to be in uppercase. If you specify the external archive log destination paths in lowercase, database might not be able to identify the specified path, and fails to recover the cloned database.

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

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 SAP 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 SAP 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:

    smsap clone create-backup-labelbackup_name-newsidnew_sid-labelclone_label-profileprofile_name-clonespecfull_path_to_clonespecfile [-taskspec _taskspec_] [-recover-from-location] path1 [,<path2>...]] [-dump]