There are four types of incomplete recovery:
- time-based recovery,
- cancel-based recovery,
- recovery using a backup control file,
- and change-based recovery.
You can decide which method to use based on the status of your database.
RECOVERY TYPE | WHEN TO USE | TYPICAL SITUATIONS | PREVENTION |
TIME-BASED | A specific point in time is known |
- Bad data was committed to the database; or
- Important data was dropped. To minimize the data loss and recovery time, the DBA should be notified immediately after the user error occurs.
- You know the approximate time when a non-mirrored online redo log becomes corrupt.
| - Multiplex online redo logs
- Test programs, security, and procedures
|
CANCEL-BASED | A specific archived redo log file is known |
- Your current redo log file or group is lost or corrupt and you cannot use it for recovery.
- You lost archived logs needed for recovery.
|
- Mirror online redo logs
- Make frequent backups and duplex the archived log files.
|
CHANGE-BASED | A specific SCN is known | - You are recovering a database in a distributed environment.
| N/A |
BACKUP CONTROL FILE | Complete Loss of the control file | - You lose all the current control files. You cannot recreate the control file, but you have the backup of the older control file.
- There is a need to restore the database to a certain point in time with a structure different from the current one.
| - Mirror the control file onto a different disk
- Keep a current text version of the control file by issuing the
ALTER DATABASE BACKUP CONTROLFILE TO TRACE; statement. |
The log files that were removed were all of our online redo log files for the database. As a result, we had to perform an incomplete database recovery to get our database back online. Incomplete database recovery means that you cannot recover all committed transactions. Incomplete means that you do not apply all redo to restore to the point of the last committed transaction that occurred in your database. In other words, you are restoring and recovering to a point in time in the past. For this reason, incomplete database recovery is also called database point-in-time recovery (DBPITR). Usually you perform incomplete database recovery
because of one of the following reasons:
Change-based recovery is often applied when you recover a database in a distributed environment.
Since a distributed database is beyond the scope of this course, this recovery method is not taught in detail in this module.
The next lesson describes recover command syntax and the steps to perform an incomplete database recovery.