Redo Log Overview
Redo Logs protect the database against a system failure. They contain
information on all committed transactions including those to the rollback
segments and are required for instance recovery. A minimum of two,
one member groups, per thread are required.
It is common to mirror these files as they are so critical for recovery.The LGWR
process writes from the redo log buffer to the redo logs. A system change
number (SCN) is assigned to identify the redo entries for each committed
transaction, there may be uncommitted transactions in the redo if the
log buffer has been flushed.
To monitor redo log files
Select from v$log and v$logfile.
Check the alert file to see how often they are swapping.
Run script sc_tuning_redologs.sql
Redo Log Alteration
Syntax to add a member to a group :
ALTER DATABASE ADD LOGFILE MEMBER 'file' TO GROUP 2;
Procedure 1 for renaming, modifying or relocating redo logs:
1. Create an extra set of redo logs in the correct size/format/location (there is a script to create_build_redos).
2. switch redo logs 'ALTER SYSTEM SWITCH LOGFILE'.
3. Check that the current log is a new one 'SELECT * FROM v$log;'
4. ALTER DATABASE DROP LOGFILE '/???';
Procedure 2 for renaming and relocating :
1. Shut down the database.
2. Back up the database.
3. Copy redo log files to the new location.
4. With database mounted, not open:
ALTER DATABASE RENAME FILE 'file' TO 'file';
ALTER DATABASE OPEN
Redo Log Creation
ALTER DATABASE ADD LOGFILE GROUP 1 ('file', 'file') SIZE 500K;