Loading...

We've detected that your browser language is Chinese. Would you like to visit our Chinese website? [ Dismiss ]
By: Emma

What Is an Oracle Redo Log and Why It Matters

An Oracle redo log records every change made to your database. When a user runs an INSERT, UPDATE, or DELETE, Oracle doesn’t write that change directly to disk. It logs it first, then flushes it to the redo log files.

If the instance crashes, Oracle replays those logged changes on the next startup, recovering every committed transaction. This is the foundation of durability in ACID compliance.

what is oracle redo log and how it works

Oracle maintains two types:

  • Online redo logs — the active files Oracle writes to in a circular pattern
  • Archived redo logs — offline copies of filled online logs, used for long-term recovery

Before diving deeper, here are four terms you’ll see throughout this guide:

  • Log Group: A set of one or more identical redo log files. Oracle writes to all members of a group simultaneously.
  • Log Member: An individual physical file within a group.
  • Log Switch: The moment Oracle finishes filling the current log group and moves on to the next available one.
  • SCN (System Change Number): A unique, ever-increasing number assigned to every transaction. Oracle uses it to keep data consistent across recovery operations.

Oracle Redo Log Files: Structure and Multiplexing

A redo log file is a preallocated, fixed-size file on disk. Unlike data files, redo logs are circular. When the last group is full, Oracle cycles back to the first group and overwrites it, but only after that group has been archived and its changes have been written to the data files (checkpointed).

Oracle organizes redo log files into a two-layer structure: groups and members. A group is a logical unit made up of one or more identical member files. The Log Writer process (LGWR) writes the same redo entries to every member in the current group simultaneously.

Multiplexing means storing multiple members of the same group on different physical disks. If one disk fails and corrupts a member file, Oracle keeps running as long as at least one member in the group remains readable. Without multiplexing, losing a single redo log file can bring the entire database down.

Log File Status Decoded

When you query V$LOG, each group will show one of four statuses:

Status What It Means
CURRENT The group LGWR is actively writing to
ACTIVE Log switch has occurred, but changes haven’t fully checkpointed to data files yet. Still needed for instance recovery
INACTIVE Changes have been checkpointed. This group is safe to reuse
UNUSED The group was just added and has never been written to

How to View Your Redo Log Configuration

To see your groups, members, sizes, and current status:

sql
SELECT 
    a.GROUP#, 
    a.STATUS, 
    b.MEMBER, 
    a.BYTES/1024/1024 AS SIZE_MB
FROM V$LOG a 
JOIN V$LOGFILE b ON a.GROUP# = b.GROUP#
ORDER BY a.GROUP#;

How to Add and Drop Redo Log Groups and Members

Add a new group (with two members on separate disks for multiplexing):

sql
ALTER DATABASE ADD LOGFILE GROUP 4
('/u01/app/oracle/oradata/REDO/log4a.rdo',
 '/u02/app/oracle/oradata/REDO/log4b.rdo') SIZE 512M;

Add a member to an existing group:

sql
ALTER DATABASE ADD LOGFILE MEMBER
'/u02/app/oracle/oradata/REDO/log1b.rdo' TO GROUP 1;

Drop a group:

sql
ALTER DATABASE DROP LOGFILE GROUP 4;
Tip: Never drop a group with a status of CURRENT or ACTIVE. To drop the current group, run ALTER SYSTEM SWITCH LOGFILE first, wait for its status to change to INACTIVE, then drop it.

How to Find and Manage Oracle Redo Log File Location

Finding the right location for your redo log files comes down to two priorities: performance and redundancy.

If you use Oracle Managed Files (OMF), Oracle handles naming and placement automatically based on the DB_CREATE_ONLINE_LOG_DEST_n parameters. But regardless of how files are placed, one rule always applies: never store members of the same group on the same physical disk. If both members sit on the same failing volume, multiplexing offers no protection. Always separate members across different mount points, storage controllers, or ASM disk groups.

How to Check Oracle Redo Log File Locations

Query V$LOGFILE to see where each member is stored and whether it lives on a regular file system or in ASM:

sql
SELECT 
    GROUP#, 
    TYPE, 
    MEMBER 
FROM V$LOGFILE 
ORDER BY GROUP#;

How to Move Redo Log Files to a New Location

Use this procedure when migrating logs to faster storage or correcting a placement issue. The rename method below works across all Oracle versions.

1. Shut down the database cleanly so all redo data is flushed to disk:

sql
SHUTDOWN IMMEDIATE;

2. Copy the files to the new location at the OS level using cp (Linux) or copy (Windows). Oracle does not move files for you — this step must be done manually.

3. Mount the database:

sql
STARTUP MOUNT;

4. Update the control file with the new paths:

sql
ALTER DATABASE RENAME FILE '/old_disk/log1a.rdo' TO '/new_disk/log1a.rdo';
ALTER DATABASE RENAME FILE '/old_disk/log1b.rdo' TO '/new_disk/log1b.rdo';

5. Verify the paths are updated before opening:

sql
SELECT GROUP#, TYPE, MEMBER FROM V$LOGFILE ORDER BY GROUP#;

6. Open the database:

sql
ALTER DATABASE OPEN;
Tip: Double-check every path in Step 4 before running it. If the path in the SQL doesn’t match the file you copied in Step 2, Oracle will fail to open the database at Step 6.

Oracle Redo Log Size and Switch Frequency: Fully Explained

Log size and switch frequency are directly linked. The size of your redo logs determines how much change data Oracle can record before it must switch to the next group. Every switch triggers a checkpoint, forcing the Database Writer (DBWn) to flush modified data from memory to disk.

When logs are too small, switches happen too often. Constant checkpointing creates an I/O bottleneck and typically shows up as “log file switch (checkpoint incomplete)” in your wait events.

The target is one switch every 15 to 30 minutes during peak load. More frequent than that is a clear sign your logs are undersized.

How to Check Your Current Switch Frequency

Query V$LOG_HISTORY to see how many switches are happening per hour over the past seven days:

bash
SELECT 
    TRUNC(FIRST_TIME, 'HH') AS HOUR,
    COUNT(*) AS SWITCHES
FROM V$LOG_HISTORY
WHERE FIRST_TIME > SYSDATE - 7
GROUP BY TRUNC(FIRST_TIME, 'HH')
ORDER BY 1;

Look for hours with high switch counts. Those are your peak periods and your sizing reference point.

How to Size Redo Logs for Your Workload

Use this formula as your starting point:

Peak Redo Rate (MB/min) × 30 min = Ideal Log Size

For standard OLTP workloads, 500 MB to 1 GB is a reasonable baseline. For databases with heavy batch jobs or end-of-day processing, size to peak load — not your daily average. Sizing for the average means your database will stall exactly when performance matters most.

One real example: a database running 200 MB logs hit 456 switches per hour during a nightly batch load. After increasing log size to 22 GB, the “log file switch (checkpoint incomplete)” wait event disappeared from AWR top waits entirely, and the batch window shrank by 40%.

How to Resize Redo Log Files

You cannot resize an existing log file directly. The process is: add larger groups, cycle through them, then drop the old ones.

1. Add new groups at your target size:

sql
ALTER DATABASE ADD LOGFILE GROUP 4 ('/u01/app/oracle/oradata/redo04.log') SIZE 2G;
ALTER DATABASE ADD LOGFILE GROUP 5 ('/u01/app/oracle/oradata/redo05.log') SIZE 2G;
ALTER DATABASE ADD LOGFILE GROUP 6 ('/u01/app/oracle/oradata/redo06.log') SIZE 2G;

2. Force a log switch so Oracle moves to the new groups:

sql
ALTER SYSTEM SWITCH LOGFILE;

3. Once the old groups reach INACTIVE status, drop them:

sql
ALTER DATABASE DROP LOGFILE GROUP 1;

4. Repeat Step 3 for each remaining old group.

Tip: You may need to run ALTER SYSTEM SWITCH LOGFILE more than once to cycle through all old groups. Always confirm a group is INACTIVE in V$LOG before dropping it.

ARCHIVELOG Mode, Recovery, and When Redo Logs Save Your Database

Every Oracle database runs in one of two modes: NOARCHIVELOG or ARCHIVELOG.

In NOARCHIVELOG mode, filled redo logs are simply overwritten. Recovery is only possible up to your last full backup — anything after that is gone.

In ARCHIVELOG mode, Oracle saves a permanent copy of every redo log before reusing it. This lets you restore an old backup and replay the archived logs to recover right up to the point of failure. For any production database, ARCHIVELOG mode is not optional.

How Crash Recovery Works

When an instance crashes and restarts, Oracle runs a two-step recovery process automatically:

  1. Roll forward: Oracle applies all redo log changes to the data files, bringing them in sync with what was in memory at the time of the crash.
  2. Roll back: Oracle identifies any transactions that were in progress but never committed, and undoes them to restore a consistent state.

No manual intervention is needed. This process completes before the database opens.

How to Check Your Mode and Enable ARCHIVELOG

Check your current archiving status:

bash
ARCHIVE LOG LIST;

If the output shows “No Archive Mode”, follow these steps to enable it:

1. Shut down the database:

sql
SHUTDOWN IMMEDIATE;

2. Mount the database:

sql
STARTUP MOUNT;

3. Enable ARCHIVELOG mode:

sql
ALTER DATABASE ARCHIVELOG;

4. Open the database:

sql
ALTER DATABASE OPEN;

Common Redo Log Problems and Fixes

Symptom Likely Cause Fix
Switches every 1–2 minutes Log files too small Increase log size using the add/drop method
log file sync wait event I/O bottleneck on the log disk Move logs to faster storage (SSD or NVMe)
log file switch (checkpoint incomplete) Not enough log groups Add more groups to give DBWn time to checkpoint
Archive destination full; database hangs Archive space not monitored Expand storage, relocate archives, or purge via RMAN

 

When Oracle Redo Logs Are Not Enough: Enterprise Backup with i2Backup

Redo logs are Oracle’s first line of defense. They handle crash recovery automatically and ensure no committed transaction is lost when an instance goes down unexpectedly.

But redo logs have limits. They cannot recover from accidental data deletion, permanent disk failure, or corruption that has already been checkpointed to the data files. They also offer no way to manage backup policies across multiple databases from a single place.

For those scenarios, you need a dedicated backup solution. i2Backup is an enterprise backup platform built to cover what redo logs cannot.

Key Features of i2Backup

  • Real-time and scheduled database backup: i2Backup supports both standalone Oracle instances and cluster environments including RAC and ADG. It captures redo logs and archive logs continuously, keeping RPO close to zero. Point-in-time recovery lets you restore the database to any specific moment, not just the last backup checkpoint.
  • Table-level restoration: Beyond full database recovery, i2Backup supports table-level backup and restoration — useful when only a subset of data needs to be recovered after accidental deletion or corruption.
  • Flexible backup destinations: Backups can be sent to local storage, NAS, or cloud targets simultaneously, eliminating single points of failure in your backup infrastructure.
  • Centralized management: A web-based console lets you schedule, monitor, and manage backup tasks across multiple database hosts without switching between tools.

A Complete Data Protection Stack

For Oracle environments that also require high availability or real-time replication, Info2soft offers two complementary products:

  • i2Availability provides real-time data replication and automatic failover between production and standby servers, keeping services running during hardware failures.
  • i2Stream handles database replication and synchronization across heterogeneous platforms, supporting Oracle, MySQL, PostgreSQL, and more.

Together with i2Backup, these tools cover the full range of data protection needs — from instance-level crash recovery to cross-platform disaster recovery.

You can click the button to get a free trial of Info2soft’s disaster recovery solutions.

FREE Trial for 60-Day

Conclusion

Oracle redo logs are the foundation of database durability. They record every committed change, enable automatic crash recovery, and — when sized and configured correctly — keep your database running without performance bottlenecks.

The key takeaways from this guide:

  • Multiplex your redo log members across separate disks to eliminate single points of failure
  • Target one log switch every 15 to 30 minutes under peak load; if you’re switching more often, your logs are undersized
  • Always run production databases in ARCHIVELOG mode
  • Size logs to your peak workload, not your daily average

That said, redo logs are not a backup strategy. They protect against instance crashes, but not against accidental deletion, hardware failure, or the need to manage recovery across multiple databases. For that, a dedicated solution like Info2soft’s i2Backup fills the gap — with continuous Oracle backup, point-in-time recovery, and centralized management across your environment.

Emma is the bridge between complex engineering and the people who need it. As a content creator at Info2Soft, she spends her days translating "tech-speak" into clear, actionable stories about data resilience. She’s not just documenting software; she's uncovering how data replication and recovery actually change the way businesses run.

More Related Articles

Table of Contents:
Stay Updated on Latest Tips
Subscribe to our newsletter for the latest insights, news, exclusive content. You can unsubscribe at any time.
Subscribe
Ready to Enhance Business Data Security?
Start a 60-day free trial or view demo to see how Info2soft protects enterprise data.
{{ country.name }}
Please fill out the form and submit it, our customer service representative will contact you soon.
By submitting this form, I confirm that I have read and agree to the Privacy Notice.
{{ isSubmitting ? 'Submitting...' : 'Submit' }}