Managing REDO Log Files:
Redo log files record all changes made to data and provide a recovery mechanism from a system or media failure.
ï Redo log files are organized into groups.
ï An Oracle database requires at least two groups.
ï Each redo log within a group is called a member.
How Redo Logs Work
ï Redo logs are used in a cyclic fashion.
ï When a redo log file is full, LGWR will move to the next log group.
ñ This is called a log switch
ñ Checkpoint operation also occurs
ñ Information is written to the control file
How to add Redo log group:
SQL> select *from v$log;
SQL> ALTER DATABASE ADD LOGFILE GROUP 3 ‘/u01/app/oracle/oradata/cts/log3a.rdo’ SIZE 4M;
How to add a Redo log member into the redo log group:
SQL>select *from v$logfile;
ALTER DATABASE ADD LOGFILE MEMBER
‘/u01/app/oracle/oradata/cts/log1b.rdo’ to group 1,
‘/u01/app/oracle/oradata/cts/log2b.rdo’ to group 2,
‘/u01/app/oracle/oradata/cts/log3b.rdo’ to group 3;
How to drop a redo log group:
SQL> ALTER DATABASE DROP LOGFILE GROUP 3;
How to drop a redo log group member:
SQL> ALTER DATABASE DROP LOGFILE MEMBER ‘/u01/app/oracle/oradata/cts/log1b.rdo’;
How to switche logfile and checkpoint force:
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM CHECKPOINT;
- We can’t drop the CURRENT and ACTIVE redo log group as well as redo log member.
- We can’t Resize the redolog group. If you want to increase the size of the redolog group then add new redolog group with new size and delete old redolog group.
- We can have different size for all redolog groups but have same size for all redolog groups.