Use the SET ARCHIVELOG DESTINATION clause if you want to restore archivelog files to a location different from the default.
The following example restores to the nondefault location /u01/archtemp. The option of the SET command must be executed from within an RMAN run{} block.
run{set archivelog destination to ‘/u01/archtemp’; restore archivelog from sequence 8 force;}
Space is the main reason for having to do this, but these types of restores are great test and practice cases to work through to experience this behavior and document for the “just in case” scenario.
Restoring a Control File
If you are missing one control file and you have multiple copies, then you can shut down your database and simply restore the missing or damaged control file by copying a good control file to the correct location and name of the missing control file.
This works if all except one file are corrupted and the multiple copies are truly on separate disks. If there is a disk or controller failure, it is possible that at least one of the control files is still available. Part of the RMAN strategy is to take the backup of the control file for these issues.
Listed next are three typical scenarios when restoring a control file:
• Using a recovery catalog
• Using an autobackup
• Specifying a backup filename
When you are connected to the recovery catalog, you can view backup information about your control files even while your target database is in nomount mode. To list backups of your control files, use the LIST command, as shown here:
$ rman target / catalog rcat/Pa$$word1@rcat RMAN> startup nomount;
RMAN> list backup of controlfile;
If you are missing all your control files and you are using a recovery catalog, then issue the STARTUP NOMOUNT and RESTORE CONTROLFILE commands:
RMAN> startup nomount; RMAN> restore controlfile;
RMAN restores the control files to the location defined by your CONTROL_FILES initialization parameter. You should see a message indicating that your control files have been successfully copied back from an RMAN backup piece. You can now alter your database into mount mode and perform any additional restore-and-recovery commands required for your database.
Note When you restore a control file from a backup, you are required to perform media recovery on your entire database and open your database with the OPEN RESETLOGS command, even if you did not restore any data files.you can determine whether your control file is a backup by querying the CONTROLFILE_ TYPE column of the V$DATABASE view.