How To Move Online Redo Logs While Database Is Running


You have online redo log files in the wrong place and want to move them.


  1. Run the following SQL to locate the current redo log groups and their members:
  2. select group_number
    , l.status group_status
    , f.member group_member
    , f.status file_status
    from v$log l
    , v$logfile f
    where =
    order by
    , f.member;

  3. Find a location that can contain the new log files.
  4. Create the new log files using the following SQL. Note that there must be at least two logfile groups after dropping unnecessary log files.
  5. sqlplus /nolog
    SQL> connect / as sysdba
    SQL> alter database add logfile ('/path/to/new/redo_01_01.log','/path/to/new/redo_01_02.log') size 150M;
    SQL> alter database add logfile ('/path/to/new/redo_02_01.log','/path/to/new/redo_02_02.log') size 150M;

  6. Run the SQL from Step 1 to determine which logfile is CURRENT.
  7. Run the following command to switch log files. After running the SWITCH command, run the SQL from Step 1 again. Repeat the process until one of the newly created logfile groups has a CURRENT status.
  8. SQL> alter system switch logfile;

  9. After one of the newly created log files is CURRENT, run the following SQL. You should only drop logfile groups that have an INACTIVE status.
  10. SQL> alter database drop logfile group GROUP#;

  11. Repeat Step 6 for each undesired logfile group.

The dropped log files should have automatically been deleted from the file system.


Oracle® Database Administrator’s Guide – Managing the Redo Log

2 thoughts on “How To Move Online Redo Logs While Database Is Running

  1. Martin

    Thank you for this detailed description, it helped me a lot. One remark: In Windows the dropped log files have not atomatically been deleted. I did it manually.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>