RMAN will restore archived redo log files from backup automatically as needed to perform recovery.

However, you can also restore archived redo logs manually if you wish, in order to save the time needed to restoroe these files later during the RECOVER command, or if you want to store the restored archived redo log files in some new location.

By default, RMAN restores archived redo logs with names constructed using the LOG_ARCHIVE_FORMAT and the LOG_ARCHIVE_DEST_1 parameters of the target database.

Restore ArchiveLogs to New Location

You can override the default location for restored archived redo logs with the SET ARCHIVELOG DESTINATION command. This command manually stages archived logs to different locations while a database restore is occurring. During recovery, RMAN knows where to find the newly restored archived logs; it does not require them to be in the location specified in the initialization parameter file.
To restore archived redo logs to a new location:

C:\RMAN TARGET SYS/SRDC@DEVTEST # database is mounted or open
RUN
{
#Specify the new location for the restored archived redo logs
SET ARCHIVELOG DESTINATION TO'/oracle/temp_restore';

#Restore the archived redo logs.
RESTORE ARCHIVELOG ALL;

# restore and recover datafiles as needed
.
.
.
}

Restore ArchiveLogs to Multiple Locations

You can specify restore destinations for archived logs multiple times in one RUN block, in order to distribute restored logs among several destinations. (You cannot, however specify multiple destinations simultaneously to produce multiple copies of the same log during the restore operation.) You can use this feature to manage disk space used to contain the restored logs.

This example restores 300 archived redo logs from backup, distributing them across the directories /fs1/tmp, /fs2/tmp, and /fs3/tmp:

RUN
{
# Set a new location for logs 1 through 100. SET ARCHIVELOG DESTINATION TO'/fs1/tmp';
RESTORE ARCHIVELOG FROM SEQUENCE 1 UNTIL SEQUENCE 100;

# Set a new location for logs 101 through 200. SET ARCHIVELOG DESTINATION TO'/fs2/tmp';
RESTORE ARCHIVELOG FROM SEQUENCE 101 UNTIL SEQUENCE 200;

# Set a new location for logs 201 through 300. SET ARCHIVELOG DESTINATION TO'/fs3/tmp';
RESTORE ARCHIVELOG FROM SEQUENCE 201 UNTIL SEQUENCE 300;

# restore and recover datafiles as needed
.
.
.
}

When you issue a RECOVER command, RMAN finds the needed restored archived logs automatically across the destinations to which they were restored, and applies them to the datafiles.

Go to top
JSN Boot template designed by JoomlaShine.com