Lesson 5 | Archivelog mode |
Objective | Discuss archivelog mode. |
Discuss archivelog mode
Archiving is the process of copying a filled redo log file to another location, either disk or tape, by using the ARCH process.
There are several advantages to configuring the database in archivelog mode. You can backup the database while it is online and you can perform a complete recovery, a point-in-time recovery, restore to a specified archive log, or restore to a specific system change number.
More work falls on the shoulders of the DBA if you use archivelog mode. You must have sufficient space for the archive log files. You must backup the archive log files to tape. You should increase the number of redo log groups to ensure that the archive process works efficiently. A filled redo log file cant be used until a checkpoint has occurred and the file has been archived.
Thus the LGWR
process may suspend writing to the redo logs until the ARCH
process completes its processing if there are not sufficient redo log file groups.
Example Situation
Take as an example the situation where we have two redo log files, log1orc1.ora and log2orc1.ora. When log1orc1.ora fills up, a log switch occurs. LGWR
will stop writing to log1orc1.ora and start writing to log2orc1.ora. With archivelog mode turned on, ARCH
will copy information from log1orc1 to an archive log file, arch001.arc. When log2orc1.ora fills up, a log switch
occurs. LGWR
will stop writing to log2orc1.ora and will start writing to log1orc1.ora. ARCH
will copy data from log2orc1.ora to arch002.arc. Note that the archive log files
are never written over, a new file is created with the next number in sequence.
The following Slide Show demonstrates how redo log and archive log files with archivelog enabled are processed.
The next lesson is about setting up archivelog mode.