Archivelog | Noarchivelog   «Prev  Next»
Lesson 5 Archivelog Mode
Objective Explain how Oracle’s ARCHIVELOG mode supports continuous data protection and recovery.

Understanding ARCHIVELOG Mode in Oracle Databases

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.

Purpose of Archiving

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).

Advantages of ARCHIVELOG Mode

While ARCHIVELOG mode provides robust recovery capabilities, it introduces additional administrative tasks:


Oracle RMAN Backup and Recovery

Example Scenario

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.

Oracle Redo and Archive Logging Process

Figure 1:
Redo log buffer and LGWR writing to online redo logs
This diagram shows the initial stage of the redo logging cycle. The Redo Log Buffer (in memory) records transaction changes, which are written to online redo log files by the Log Writer (LGWR). When one log fills up, LGWR performs a log switch and continues writing to the next log file.
Figure 2:
Oracle log switch from one redo log to another
This image illustrates a log switch event. When the current redo log (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.
Figure 3:
Redo log overwrite process in NOARCHIVELOG mode
This image depicts the behavior in NOARCHIVELOG mode. When LGWR cycles back to 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.

Operational Modes Compared

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

Best Practices for ARCHIVELOG Management

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.


SEMrush Software 5 SEMrush Banner 5