Duplicating an Oracle Database from an Active Database without a Configured Instance
Create a duplicate database for testing, and demonstrations.
When you duplicate a database from an active database, no backup is required. The duplicate database is a copy of the current data on the target database.
A duplicate (auxiliary) database is a copy or a subset of the target database with a unique DBID. It is independent of the primary database, and can be registered in the same recovery catalog as the primary database.
Before You Begin
- Provide a password to connect to the source database.
- The source database must be in ARCHIVELOG mode if it is open. When the source database is in NOARCHIVELOG mode, perform a clean shut down and place it in MOUNT mode.
- If the auxiliary database instance is on the local host, provide a net service name to connect RMAN to the auxiliary database instance.
- The source database and the duplicate database instance must use the same SYSDBA password.
- Create an Auxiliary Instance for the duplicate database.
- Set the source and destination client install paths to the same value. For more information, see Setting the sNOSBTLIBNAME Additional Setting to Skip Passing SBT_LIBRARY to the Allocate Channel Command.
- Run the Ora_install.sh on the duplicate database client.
- Run the database readiness check on the auxiliary instance to verify that the instance is ready for backup and restore operations.
- From the CommCell Browser, expand Client Computers > client > Oracle.
- Right-click the instance, point to All Tasks and then click Browse and Restore.
- Select Latest Backup and click View Content.
- Select the database and click Recover All Selected.
- On the Restore Options dialog box:
- Select the Duplicate DB check box.
- To get the latest database status, click Refresh.
- Click Advanced.
The Oracle Duplicate Options dialog box appears.
- On the Duplicate tab:
- Select the Duplicate To check box.
- In the Database Name box, enter the name of duplicate database.
- In the Pfile box enter the name of startup parameter file for the duplicate database.
- To skip the read-only tables, select the Duplicate to Skip Read-Only check box.
- To open the database in restricted mode, select the Duplicate to Restricted check box.
- On the Duplicate DB Options tab select the Duplicate from Active Database check box.
- Optional: Select the duplication options.
Disable filename validation
By default, RMAN verifies the datafiles on the source and target database do not have the same names. This option enables the Oracle NOFILENAMECHECK option.
Set this option when the source and target databases need to have the same names.
On the Duplicate tab, select the No Filename Check check box.
Exclude Oracle pluggable databases (PDBs) from the duplicate database
On the Duplicate tab:
Select the select the Duplicate To Skip PDB check box and then click Add.
The PDB dialog box appears. Select the PDBs that you want to exclude and then click OK.
Redirect the datafiles and tablespaces
Use this option when you do not want to use the DB_FILE_NAME_CONVERT option to restore all the data and temp files to a different directory structure from the source database.
On the Redirect tab, select the redirected data:
- To redirect all data files, select Redirect All Table Spaces/Database to and type the path.
- To redirect temp tablespaces, select Redirect Temp Table Spaces To and type the path.
Alternatively, select individual table spaces and type the path in the New Path box.
To redirect multiple table spaces simultaneously, click Find & Replace and provide to replace the existing path with the new path.
Create online redo logs for the duplicate database
Select the Group option to use and specify redo log files by using group members, or the File option to specify redo log files by using a file, and click Add.
- If you selected the File option, in the Spec Dialog for Oracle Redo Log File box, type the redo log file name.
- In the Size box, type the size of the online redo log file.
- In the SizeSpec list, select the size specifications of the file.
- To allow the database to reuse an existing file, select the Reuse check box.
- Optional: View or customize the RMAN script that is automatically generated from the selected options For more information, see Viewing Oracle Restore RMAN Scripts and Customizing Oracle Restore RMAN Scripts.
- Click OK to close the Oracle Duplicate Options dialog box.
- Click OK to close the Restore Options dialog box and start the restore.
What to Do Next
- Set the source and destination client install paths to different values. For more information, see Setting the sNOSBTLIBNAME Additional Setting to Skip Passing SBT_LIBRARY to the Allocate Channel Command.