Oracle Database Administration II study materials
Oracle Database Administration II study resources

Oracle Database Administration II: Restore and Recovery Operations

Oracle Database Administration II · Work through your exam, one topic at a time.

All guide sections

Restore and Recovery Operations

This domain examines whether you can choose the correct restore and recover sequence for lost datafiles, lost control files, and logical damage requiring point-in-time recovery. The exam distinguishes restoring files from applying redo.

Restore versus recover

RESTORE copies files from backups; RECOVER applies archived and online redo to make them consistent. For a lost datafile, start the instance in mount state, run RESTORE DATAFILE 4, then RECOVER DATAFILE 4, then open the database. If the datafile was created after the last backup, RMAN may need a backup from after its creation or you must recreate it.

Incomplete recovery

Use SET UNTIL TIME, SET UNTIL SCN, or SET UNTIL SEQUENCE inside a RUN block before RESTORE. Then RESTORE DATABASE, RECOVER DATABASE, and ALTER DATABASE OPEN RESETLOGS. The resetlogs operation creates a new incarnation recorded in V$DATABASE_INCARNATION. Tablespace point-in-time recovery uses an auxiliary instance and recovers only the affected tablespaces.

Control file and block recovery

If the control file is lost, start in nomount, run RESTORE CONTROLFILE FROM AUTOBACKUP, mount, then restore and recover. Block media recovery is online: RECOVER DATAFILE 7 BLOCK 120 or BLOCKRECOVER CORRUPTION LIST restores only damaged blocks from a backup or image copy.

Worked example

At 10:15 a batch job corrupts data. The DBA shuts down abort, starts mount, and runs: RUN { SET UNTIL TIME "TO_DATE('2025-05-01 10:14:00','YYYY-MM-DD HH24:MI:SS')"; RESTORE DATABASE; RECOVER DATABASE; ALTER DATABASE OPEN RESETLOGS; }. The SET UNTIL must precede RESTORE; archived redo through 10:14 must exist. After resetlogs, take a new full backup because the incarnation has changed.

Traps

Running RECOVER DATABASE without SET UNTIL applies all available redo and defeats point-in-time recovery. A missing archived log stops recovery; RMAN reports the sequence needed. RESTORE alone never applies redo. Old backups from a prior incarnation are not directly usable after resetlogs without incarnation handling.