| Lesson 5 | Archivelog Mode |
| Objective | Explain how Oracle’s ARCHIVELOG mode supports continuous data protection and recovery. |
Oracle’s ARCHIVELOG mode is a crucial component of its backup and recovery architecture. It ensures that every transaction can be recovered, even after hardware failures or data loss. When the database operates in ARCHIVELOG mode, filled redo log files are copied (archived) to a safe location by the ARCH process before they are reused. This archived data becomes the foundation for point-in-time recovery and complete database restoration.
Archiving is the process of copying a filled redo log file to disk or tape. This operation is managed automatically by the ARCH process. The archived copies-called archived redo logs-preserve every transaction since the last backup. With this data, a DBA can recover the database to a precise point in time or to a specific System Change Number (SCN).
While ARCHIVELOG mode provides robust recovery capabilities, it introduces additional administrative tasks:
LGWR process from stalling while waiting for archiving to complete.
Consider a database configured with two redo log files: log1orc1.ora and log2orc1.ora. When log1orc1.ora becomes full, the LGWR process performs a log switch and begins writing to log2orc1.ora. With ARCHIVELOG mode enabled, the ARCH process copies the contents of log1orc1.ora to an archived file, such as arch001.arc.
When log2orc1.ora fills up, another switch occurs, and ARCH archives it to arch002.arc.
Each archived log is retained sequentially, providing a continuous record of transactional activity that can be replayed during recovery.
The following figures illustrate the flow of redo data from memory to disk, highlighting how Oracle protects data through log switching and archiving.
log1orc1.ora) fills up, LGWR switches to the next log (log2orc1.ora).
In ARCHIVELOG mode, the ARCH process then copies the full redo log to an archived redo log file.
These archived logs are essential for complete and point-in-time recovery.
log1orc1.ora after log2orc1.ora fills, the contents of the first log are overwritten.
Since no archived copy exists, previously committed transactions are lost, and recovery is limited to the last physical backup.
| Feature | ARCHIVELOG Mode | NOARCHIVELOG Mode |
|---|---|---|
| Backup While Online | Supported | Not Supported |
| Point-in-Time Recovery | Available using archived logs | Not possible beyond last full backup |
| Redo Log Reuse | After archiving completes | Overwritten immediately |
| Storage Requirement | Requires additional space for archived logs | Minimal space, limited recovery |
RMAN (Recovery Manager) tool to automate archive log deletion after backup.By implementing ARCHIVELOG mode, Oracle ensures that committed transactions are never lost, even if a disk or datafile is damaged. This capability forms the backbone of Oracle’s media recovery strategy, allowing DBAs to restore databases with precision and reliability.
The next lesson explains how to enable ARCHIVELOG mode and verify that the archiving process operates correctly.