Managing the Online Redo Log

Creating Redo Log Groups and Members

Creating Redo Log Groups.

ALTER DATABASE
ADD LOGFILE GROUP 10 ('/oracle/dbs/log1c.rdo', '/oracle/dbs/log2c.rdo')
SIZE 100M BLOCKSIZE 512;

Creating Redo Log Members.

ALTER DATABASE ADD LOGFILE MEMBER '/oracle/dbs/log2b.rdo' TO GROUP 2;

Relocating and Renaming Redo Log Members

SHUTDOWN IMMEDIATE

mv /diska/logs/log1a.rdo /diskc/logs/log1c.rdo
mv /diska/logs/log2a.rdo /diskc/logs/log2c.rdo

STARTUP MOUNT

ALTER DATABASE
RENAME FILE '/diska/logs/log1a.rdo', '/diska/logs/log2a.rdo'
TO '/diskc/logs/log1c.rdo', '/diskc/logs/log2c.rdo';

ALTER DATABASE OPEN;

Dropping Redo Log Groups and Members

An instance requires at least two groups of redo log files, regardless of the number of members in the groups. (A group comprises one or more members.)
You can drop a redo log group only if it is inactive. If you must drop the current group, then first force a log switch to occur.
Make sure a redo log group is archived (if archiving is enabled) before dropping it. To see whether this has happened, use the V$LOG view.

SELECT GROUP#, ARCHIVED, STATUS FROM V$LOG;

GROUP# ARC STATUS
--------- --- ----------------
1 YES ACTIVE
2 NO CURRENT
3 YES INACTIVE
4 YES INACTIVE

ALTER SYSTEM SWITCH LOGFILE;

Dropping Log Groups.

ALTER DATABASE DROP LOGFILE GROUP 3;

Dropping Redo Log Members.

ALTER DATABASE DROP LOGFILE MEMBER '/oracle/dbs/log3c.rdo';

Clearing a Redo Log File

If there are only two log groups.
The corrupt redo log file belongs to the current group.

ALTER DATABASE CLEAR LOGFILE GROUP 3;

If the corrupt redo log file has not been archived, use the UNARCHIVED keyword in the statement.

ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 3;