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

Oracle Database Administration II: Flashback Technologies and Data Recovery Advisor

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

All guide sections

Flashback Technologies and Data Recovery Advisor

This domain tests selecting the right flashback feature for a user error versus media failure, and using Data Recovery Advisor to diagnose and repair failures through RMAN. Know the prerequisites and limits of each feature.

Flashback query and table

Flashback Query (AS OF TIMESTAMP or AS OF SCN) reconstructs rows from undo. Flashback Version Query (VERSIONS BETWEEN) shows changes with timestamps and SCNs, and FLASHBACK_TRANSACTION_QUERY maps a transaction to its undo SQL. FLASHBACK TABLE ... TO TIMESTAMP/SCN requires row movement enabled; FLASHBACK TABLE ... TO BEFORE DROP recovers a dropped table from the recyclebin and fails after a purge. Undo retention limits how far query and table flashback can reach.

Flashback database and restore points

Flashback Database uses flashback logs in the fast recovery area. Enable with ALTER DATABASE FLASHBACK ON; DB_FLASHBACK_RETENTION_TARGET sets the target in minutes. The database must be mounted; run FLASHBACK DATABASE TO TIMESTAMP, TO SCN, or TO RESTORE POINT, optionally open read-only to verify, then OPEN RESETLOGS. A guaranteed restore point forces retention of the flashback logs needed to reach it; a normal restore point is only a name for an SCN.

Data Recovery Advisor

DRA uses health monitor checks and is driven from RMAN: LIST FAILURE, ADVISE FAILURE, REPAIR FAILURE. Failures have priority and can be closed or changed. DRA handles data failures such as missing datafiles, corrupt blocks, and inaccessible files; it does not diagnose logical corruption or bad SQL.

Worked example

Before an application upgrade, create CREATE RESTORE POINT before_upgrade GUARANTEE FLASHBACK DATABASE. After the upgrade, the application corrupts data logically but files are intact. Mount the database and run FLASHBACK DATABASE TO RESTORE POINT before_upgrade, verify read-only, then open resetlogs. This is faster than restoring a backup and applying redo, but it cannot repair a lost datafile.

Traps

Flashback Database cannot fix media failure or a restored datafile. Flashback Table cannot undo a truncate. Flashback query is limited by undo retention, and a guaranteed restore point does not extend undo. DRA commands run in RMAN, not SQL*Plus.