Redo log files help Oracle ensure that the effects of a user’s transaction are durable even if there is a computer failure. Before any data in the data files is changed, the log writer (LGWR) process stores a copy of the old data (undo information) and the new data (redo information) in the redo log file. In the event of a computer failure, the redo log files enable Oracle to undo the effects of incomplete transactions (uncommitted transactions) and verify the changes of completed transactions (committed transactions). The sizes of the redo log files are decided by the database administrator. It is conventional but not required for all redo log files to be of the same size. An Oracle database
needs at least two redo log files. Oracle uses the redo log files in round-robin fashion; when one redo log file is completely filled, Oracle begins filling the next one, and so on. Because the redo log files defend the database against computer failure, they must be well protected. It is typical to mirror each redo log file; a mirrored set of redo log files is referred to as a redo log group. It is also typical to put each member of a redo file group on a different storage disk. All the members of a redo file group have the same size; the log writer process stores the same information in all members of a redo file group. Oracle can therefore continue to operate as long as at least one member of each redo file group is undamaged.
Archived Redo Log Files
When a redo file fills up, an Oracle component called the archiver makes one or more copies of it in locations specified by the database administrator. Multiple copies improve the chances that at least one will survive if the storage disks are damaged. These copies make it possible to reconstruct data files if they are ever damaged. If a data file is damaged, the database administrator can first restore the most recent backup copy of the data file, and the information contained in the archived redo files can be systematically processed to reproduce the effects of all the transactions that modified the data file since the backup copy was created.