The recovery mechanism in Oracle also uses two technologies: dumping and registering log files.
Oracle provides DBA with a variety of methods for dumping backup copies, such as file copying, using the Oracle Export utility, using the SQL command spool and programming. Correspondingly, Oracle also provides a variety of methods for reinstalling backup copies, such as file copying, using Oracle's Import utility, using SQL * Loader, and self-programming.
In earlier versions of Oracle (V.5), log files are measured in data blocks. That is to say, Oracle recovery operations are not based on operations, but on data blocks. Oracle stores the old and new values in two different log files. The log file that records the old values before database updates is called the database preimage file (Befor Image, BI file for short ), the log file that records the updated value of the database is called the After Image (aifile) of the database ). Because BI files are required to restore the database to a consistent state, BI files are required. The purpose of aifiles is to reduce the transaction programs that must be re-run and restore as many databases as possible. Therefore, aifiles are optional in Oracle. Log Files occupy a lot of space. To save storage space and operation time, DBA may not configure the aifile. If no aifile is available, the recovery mechanism can only perform UNDO and REDO operations for fault recovery.
Oracle7 provides a REDO log file and a Rollback Segment to recover data more effectively when a fault occurs and to solve the "dirty" data read problem ). the REDO log file records the front and back images of the updated data, and the rollback segments in the database buffer record the front images of the updated data. To reduce the number of times that log files are scanned when fault recovery is performed using log files, Oracle7 first scans the REDO log file and retries all operations, including uncommitted transactions, then, undo the uncommitted transactions based on the data in the rollback segment.