RMAN Restore and Complete Recovery

Oracle DBA Certification 16 min min read Updated: Nov 16, 2026 Advanced
RMAN Restore and Complete Recovery
Advanced Topic 4 of 8

The Recovery Process

  1. Find out what is damaged.
  2. Restore the damaged files from backup.
  3. Recover them by applying archived and online redo.
  4. Open the database.
Complete recovery: Recovering up to the very last committed transaction with no data loss. It needs the backup plus all archived redo since then, and the current online redo.

Scenario 1: Lost a Non-System Datafile (Database Open)

A datafile of a user tablespace is deleted. Users get errors, but the database stays up.

sql SQL> SELECT file#, name FROM v$datafile; SQL> ALTER DATABASE DATAFILE 7 OFFLINE; RMAN> RESTORE DATAFILE 7; RMAN> RECOVER DATAFILE 7; SQL> ALTER DATABASE DATAFILE 7 ONLINE;

Only the objects in that datafile were unavailable. The rest of the database kept running.

Scenario 2: Lost a SYSTEM Datafile or Many Files

The SYSTEM tablespace cannot be taken offline, so the database must be closed first.

sql SQL> SHUTDOWN ABORT; SQL> STARTUP MOUNT; RMAN> RESTORE DATABASE; RMAN> RECOVER DATABASE; SQL> ALTER DATABASE OPEN;

Scenario 3: Lost All Control Files

sql SQL> STARTUP NOMOUNT; RMAN> SET DBID 1234567890; -- only if RMAN cannot find it RMAN> RESTORE CONTROLFILE FROM AUTOBACKUP; SQL> ALTER DATABASE MOUNT; RMAN> RESTORE DATABASE; RMAN> RECOVER DATABASE; SQL> ALTER DATABASE OPEN RESETLOGS;
Write down your DBID: Run SELECT dbid FROM v$database; and store it with your documentation. You need it when the control file is lost and RMAN has no records.

Scenario 4: Lost the SPFILE

sql SQL> STARTUP NOMOUNT PFILE='/tmp/init_minimal.ora'; RMAN> RESTORE SPFILE FROM AUTOBACKUP; SQL> SHUTDOWN IMMEDIATE; SQL> STARTUP;

Scenario 5: Lost the Whole Server

  1. Install the same Oracle version and patch level on the new server.
  2. Copy the backups and autobackup to it.
  3. STARTUP NOMOUNT with a minimal parameter file.
  4. RESTORE SPFILE, restart, RESTORE CONTROLFILE, RESTORE DATABASE, RECOVER DATABASE.
  5. ALTER DATABASE OPEN RESETLOGS.

What is RESETLOGS?

OPEN RESETLOGS creates a new redo history. It is required after recovery with a restored or recreated control file or after incomplete recovery. After it, take a new full backup immediately.

CommandMeaning
RESTOREBring files back from the backup
RECOVERApply redo to catch up
RMAN> LIST FAILURE;Ask Oracle what it thinks is wrong
Practice on a test system: Do not wait for a real emergency. Delete a datafile in a test database and rehearse each scenario until you can do it without notes.

Conclusion

Recovery is: find the damage, restore from backup, recover with redo, open. Keep your DBID, SPFILE and control file autobackups safe and rehearse often.

Quick Summary: RESTORE copies files, RECOVER applies redo, OPEN RESETLOGS after a restored control file.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators