Backup and Recovery
Scope
This domain covers RMAN backup and recovery, archive log mode, the fast recovery area, restore versus recover, and flashback. Questions often describe a lost datafile or an incomplete recovery scenario.
Core rules
- ARCHIVELOG mode enables online backups and point-in-time recovery; NOARCHIVELOG permits only consistent closed backups. The fast recovery area stores backups, archived logs, and control file autobackups.
- RMAN full backup copies used blocks; level 0 is the incremental base; level 1 can be differential or cumulative. Image copies are byte-for-byte; backup sets are RMAN format. Retention policies and channels control space and parallelism.
- RESTORE retrieves files; RECOVER applies redo and undo. Complete recovery uses all redo; incomplete recovery stops at a time, SCN, or sequence. Flashback Database rewinds the database using flashback logs.
- Data Recovery Advisor and LIST FAILURE help identify and repair failures.
Worked example
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS; BACKUP DATABASE PLUS ARCHIVELOG; If a datafile is lost, RESTORE DATAFILE 4; RECOVER DATAFILE 4; applies archived and online redo. The database can stay open if the file is not critical and is offline.
Traps
A consistent backup requires the database to be closed in NOARCHIVELOG. RESTORE is not RECOVER. A control file autobackup is not a datafile backup. Flashback Database is not media recovery. Backups in the FRA can be deleted by retention.