Recovery

For standard recovery situations see below, it is always advisable to phone Oracle support to check any procedures before restoring. Whenever possible take a backup first.

Backup taken with database open?

To recover corrupted rollback segments or an associated datafile.
To recover a corrupted index datafile
Data Files
*



*


*
*
*



*
*
*

Online Redo

*


*
*


*
*

*
*


*

Archived


*

*
*

*

*
*

*

*


Control Files



*
*
*

*
*

*
*

*



ARCHIVELOG
Media Rec
Rec Redo's
Take a backup
Rec Ctrlfiles
Restore full backup
Rec Redo,ctrlfile
& do backup
Restore full backup
Media Rec
Restore full backup
Rec ctrlfile & backup
Rec Redo & Ctrlfile
Rec Redo & backup
Media Rec & Ctrlfile
Restore full backup
Media Rec

NOARCHIVELOG
Restore full backup
Rec Redo's
N/A
Rec Ctrlfile
N/A
N/A

N/A
Restore full backup
N/A
N/A
Rec Redo's and Ctrlfile
N/A
Restore full backup
N/A
Restore full backup

Recover Online Redo Logs

To recover from loss of an inactive online redo log group:

1 Abort the current instance.
2 Start a new instance and mount the database.
3 If the last logfile was archived 'alter database clear logfile'.
4 If it was not archived issue 'alter database clear unarchived logfile' and backup the database. (backups are required as this way makes the archives unusable).

Loss of an active online redo log.

1.0 If the database is running and the active log is not current use the 'alter system checkpoint'. If this is successful your active log is rendered inactive and the procedure above is followed.
2.0 If the log file is current or the above does not work :
2.1 If in noarchivelog I would try recreating the controlfile as below but modifying for resetlogs, this would mean loss of any work in the redo's. Otherwise its recovery from a full backup.
2.2 If in archivelog mode incomplete media recovery can be performed using 'cancel-based, time-based or change-based, make sure the current log cannot be used by renaming it.

Loss of Control Files

If only certain control files are damaged:
1 Shutdown abort.
2 Copy an intact copy to where the damaged one was or alter the init.ora file.
3 Startup.

If all control files are damaged:
1 Use the CREATE CONTROLFILE command with NORESETLOGS to recreate them.
2 RECOVER DATABASE
3 ALTER DATABASE OPEN.

Complete Media Recovery

1.0. Shutdown the database.
2.0. Restore any damaged files, do not restore undamaged. If the files can be restored to their original location skip to step 3.
2.1. If necessary alter the parameter file to indicate the new location of the control files.
2.2. Mount the database.
2.3. Issue 'alter database rename file 'file1', 'file2' to 'file3', 'file4';' for each file to be moved.
3.0. Query v$datafile to see if all datafiles are online, if not issue 'alter database datafile 'full name' online;'.
4.0. Start recovery of damaged file 'recover database;'
5.0. Open the database 'alter database open;'