By default, when you restore database tables to a target instance, the system automatically duplicates the source database to an auxiliary instance in a temporary staging location specified during the restore operation. The database will be automatically imported from this auxiliary instance after the restore.
Use this when you want to restore a table to a specific failure point.
Procedure
-
Copy the init<SID>.ora file from the source database to the auxiliary database instance.
-
Update the database name and the database file locations in the init<SID>.ora file for the auxiliary database instance.
-
Add the DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT parameters in the init<SID>.ora file. These parameters will redirect the datafiles, temp files, and log files to the auxiliary instance.
Windows Clients:
DB_FILE_NAME_CONVERT=('source_of_df_path/','dup_of_df_path/', 'source_of_temp_path/','dup_of_temp_path/') LOG_FILE_NAME_CONVERT=('source_of_log_path/ redo','dup_of_log_path/redo')Unix Clients:
DB_FILE_NAME_CONVERT=(source_of_df_path/,dup_of_df_path/ , source_of_temp_path/,dup_of_temp_path/) LOG_FILE_NAME_CONVERT=(source_of_log_path/redo,dup_of_log_path/redo) -
Add the log_archive_dest_1 parameter to the init<SID>.ora file on the auxiliary instance.
-
Restart the Oracle Services, if using Windows clients.
-
Add the destination instance name in the Listener.ora and Tnsnames.ora files. If using a different host, add the duplicate database instance name in the Listener.ora file on the destination host and Tnsnames.ora files on the destination and source hosts. Also, add the original database name in the Tnsnames.ora file on the destination host.
DUPDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = powerpc02)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME =dupdb) (UR=A) ) ) -
Restart the Listener.
$lsnrctl reload -
Ensure that the auxiliary instance is in NOMOUNT mode.
sql> startup nomount;