You are on page 1of 2

REDO LOG FILES

Q# In which conditions LGWR (Background Process) writes to current online redolog


file group.

1. When a transcation commits.


2. Redolog buffes become one-third full.
3. More than megabyte of changed records in the redolog buffers.
4. Before the DBWn writes modified blocks in the database buffer cache to the
datafile.

ADDING ONLINE REDOLOG FILE GROUPS

ALTER DATABASE ADD LOGFILE GROUP 3


(‘location/log3a.rdo’,’location/log3b.rdo’) SIZE 1m;

• The minimum size of an online redolog file is 50KB.


• If a message in a LGWR trace file or in alert file indicates that LGWR
frequently must wait for a group because checkpoint has not completed or a
group has not been archived, you should add groups.
• At least 2 groups are required.

ADDING ONLINE REDOLOG FILE GROUPS


ALTER DATABASE ADD LOGFILE MEMBER
‘location/log3a.rdo’, TO GROUP 1
’location/log3b.rdo’ TO GROUP 2;

DROPPING REDOLOGS GROUP


ALTER DATABASE DROP LOGFILE GROUP 2;

NOTE: 2 groups are required to database. Active or current group cannot be


dropped, when group is droped the operating system file are not deleted.

DROPPING REDOLOG MEMBER


ALTER DATABASE DROP LOGFILE MEMBER
‘home/log3b.rdo’;

NOTE:

• If the member you want to drop is the last valid member of group, you cannot
drop that member.
• If the group is current, you must forse to switch before you can drop the
member.
• If member is not archived, then it cannot be dropped.

Page 1 of 2
REDO LOG FILES
REALOCATING OR RENAMING ONLINE REDOLOG FILES
STEP-1
SHUTDOWN

STEP-2
Copy redo log files to the new location.

STEP-3
STARTUP MOUNT

STEP-4
ALTER DATABASE RENAME FILE
‘old location/filename.rdo’ to ‘new loc/filename.rdo’;

STEP-5
ALTER DATABASE OPEN;

MANAGING ONLINE REDO LOG FILES WITH OMF


PARAMETERS:
DB_CREATE_ONLINE_LOG_DEST_1=’location only’
DB_CREATE_ONLINE_LOG_DEST_2=’location only’

Groups can added like this


ALTER DATABASE ADD LOGFILE;

Dropping a member;
ALTER DATABASE DROP LOGFILE GROUP 3;

VIEWS:

V$LOG;

V$LOGFILE;

Page 2 of 2

You might also like