Restoring Control and Server Parameter Files for Oracle
Control and SP files are required to recover a database to the current state. Restore control and SP files in the following scenarios:
- The control file is lost and you need to restore the backup repository contained in the control file
- The recovery catalog is lost
- The recovery catalog was never used
- The catalog connect string is not specified for the instance during the backup
Configure an auto backup of control files to restore the control file from auto backup. The control file restore destroys all the previous backups.
If your database consists of multiple control files copies, you can replace a corrupted control file by manually copying an existing control file, and then restoring it.
Before You Begin
- Perform a Control File Backup.
- Place the database in NOMOUNT mode, or set the SnapProtect software to automatically move the database to the correct mode before the restore.
- Optional: When the backup pieces are unknown to the RMAN repository, catalog the backup pieces. For more information, see Cataloging RMAN Backup Pieces.
- 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.
- Optional: Use non-default Browse and Restore options. See Browse and Restore.
- In the right pane of the CommCell Browser window, select all the database, and click Recover All Selected.
- To restore the latest backup to the same location, on the Restore Options dialog box, select the Restore Control File check box and click OK.
- For all other restore options, on the Restore Options dialog box, select the Restore Control File and Restore SP Files check boxes and click Advanced.
- On the Advanced Restore Options dialog box, click the Ctrl & SP Files tab and then select the Restore Control File and Restore From check boxes.
Select the method to use when restoring the control file.
Restore the control file to the latest backup
In the Restore Control File and Restore SP File sections, select the Restore From check box, and select the From auto Backup option.
Restore the control file to a specific backup piece
In the Restore Control File and Restore SP File sections, select the Restore From check box, and select the From Backup piece option and then type the auto backup piece name in the box.
Obtain the backup piece value from the RMAN logs of an offline backup job.
Restore the control file to a point-in-time
- On the Ctrl & SP Files tab in the Restore Control File and Restore SP File sections, select the To Point-in-Time check box and type the data and time.
- On the Options tab, in the Time Zone box, select the time zone of the client computer.
This is required when the client time zone is different than the CommServe computer's time zone.
- To restore the control file to a new location, on the Ctrl & SP Files tab in the Restore Control File section, select the Restore SP File As check box and enter the path in the box.
- To set the SnapProtect software to automatically move the database to the correct mode before the restore, select the Switch Database mode for Restore check box.
- Optional: Select the restore options.
Set the Oracle Database ID
The Oracle DBID is an internal, uniquely generated number that distinguishes the target database from the rest of the databases with the same name, in the recovery catalog. Oracle creates this number automatically when you create the database.
You can use this option when:
- There is no control file and you need to restore the control file or SP file from the autobackup
- Multiple databases exist in the recovery catalog and you need to restore the control file
On the Options tab, select the Set DBID check box.
Open the database after the restoreAfter a restore, set the SnapProtect software to automatically open the Oracle database. When the database is open, it records transactions.
On the Options tab, select the Open DB check box.
Reset the database and logs.By default, the database is automatically set to open, and the logs are reset.
If you reset the logs to an open state, you can then reset the database.
On the Options tab, select the Reset Database check box and one of the following Reset Log options:
- To open the database without the RESETLOGS option, select None.
- To open the database with the RESETLOGS option, select Yes.
- To open the database with the NORESTLOGS option, select No.
Perform a point-in-time restore of a database that was backed up in NOARCHIVELOG mode
If the database was backed up in NOARCHIVELOG mode, enable the redo logs.
When the no redo log is disabled, RMAN searches archived redo logs after applying the incremental backup data during a restore. When you set No Re-do Logs, RMAN restores the data from the incremental backup and not the archived redo logs.
On the Options tab, select the No Re-do Logs check box.
Prevent RMAN failovers to the previous backup for Oracle 10g databases or higherSelect this option if you want to increase the speed.
During restore operations, RMAN automatically looks for another copy of the backup file under the following circumstances:
- A backup piece is corrupted or deleted
- A MediaAgent is offline
- A block in the backup is corrupted within the latest full backup
If another copy is not available in the other copy, RMAN uses an older version of the file. When multiple channels are available for the same device type, RMAN automatically retries on another channel and searches all prior backups until it has exhausted all possibilities.
On the Options tab, select the Disable Oracle Channel Restore Failover check box.
Validate the restoreValidation verifies that the backup copies of the data and logs are intact and usable for restores. RMAN simulates the restore job without the media to determine whether the restore can be successfully performed.
When a validate job is complete, you can view the job log files to identify and correct any issues.
On the Options tab, select the Validate check box.
Perform a point-in-time restore when the database is in NOARCHIVELOG mode
When you set this feature, RMAN restores only the data from the incremental backup and not the archived redo logs.
On the Options tab, select the No Re-do Logs check box.
Configuring Pre- and Post-ProcessesRun scripts before or after the restore.
Enter the full path for the pre-recovery and post-recovery script.
You can choose to run the post-process script even if the restore job failed. You can use the post-process script to bring a database online or to release a snapshot.
To pass the database instance name to the script, see Passing the Instance Name to Pre and Post Scripts for Databases.
On the Pre/Post tab:
- In the Pre-Recovery Command box, type the full path name for the script.
- In the Post-Recovery Command box, type the full path name for the script.
- To run the post recovery process regardless of the job's outcome, select the Run Post Process for all attempts check box.
- In Windows configurations, specify the user that runs the process, in the Pre/Post Impersonation section, select one of the options:
if the local account has permission to execute the processes on the destination client, select the Use Local Accounts option.
To impersonate another user with permission, select the Impersonate User option and enter the credentials.
Restore from a copy precedence
If the backup is corrupted, restore from a storage policy copy instead of the backup.
For more information on modifying the copy precedence of a storage policy copy, see Copy Precedence.
On the Copy Precedence tab, select the Restore from Copy Precedence number check box and enter a copy precedence number.
Restore from a specific backup
On the Restore tab, select the By Tag check box and enter the tag.
- Click OK to close the Advanced Restore Options dialog 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 Restore Options dialog box and start the restore.
What to Do Next
- Place the database in MOUNT mode.
- Perform a full database restore.