Fdi - Maitaining Redo Log Files
Fdi - Maitaining Redo Log Files
Fdi - Maitaining Redo Log Files
1. List number and location of existing log files and display the number of redo
log file group and members your database has
Hint:
- Query the dynamic view V$LOGFILE
- Use the dynamic view V$LOG
SQL> SELECT MEMBER FROM V$LOGFILE;
-----------------------------------------------------------------
D:\ORACLE\ORADATA\LEARNING\REDO03.LOG
D:\ORACLE\ORADATA\LEARNING\REDO02.LOG
D:\ORACLE\ORADATA\LEARNING\REDO01.LOG
3. Add a redo log member to each group in your database located on u04, using
the follwing naming convention:
Add member to Group 1: log01b.rdo
Add member to Group 2: log02b.rdo
Verify the result
Hint:
- Execute the ALTER DATABASE ADD LOGFILE MEMBER
command to add a redo log member to each group
- Query the dynamic performance view V$LOGFILE to
verify the result.
SQL> Alter database add logfile member/
'd:\oracle\oradata\u04\redo1b.log' to group 1;
Database altered.
Database altered.
6 rows selected.
4. Add a redo log group in your database with two members located on u03 and
u04 using the following naming conventions:
Add Group 3: log03.rdo and log03b.rdo verify the result
Hint:
- Execute the ALTER DATABASE ADD LOGFILE command
to create a new group
- Query the dynamic view V$LOGFILE to display the name
of the view members of the new group
- Query the Dynamic view V$LOG to display the number
of redo log file groups and members
6. Resize all online redo lof files to 1024 KB. (Because we cannot resize log files,
we have to add new logs and drop the old.)
Hint:
- Execute the ALTER DATABASE ADD LOGFILE GROUP
command to add two new groups with the size 1024 KB
- Query the dynamic view V$LOG to check the active
group
- Execute the ALTER SYSTEM SWITCH LOGFILE command
to force log switches and change the group stage in
inactive. The number of log switches required will vary.
- Execute the ALTER DATABASE DROP LOGIFLE command
to remove th inactive groups
- Query the dynamic view V$LOG to verify the result.
MAINTAINING 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
Status
INVALID indicates the file is inaccessible
STALE indicates that the contents of the file are
incomplete
Delete indicates that the file is no longer used
Blan indicate that the file is in use
V$Log
Status
UNUSED
CURRENT
ACTIVE
CLEARING
CLEARING_CURRENT
INACTIVE