This content has been marked as final. Show 5 replies
A damaged online redo logfile can be regenerated. Oracle provides an ALTER
DATABASE CLEAR LOGFILE GROUP # command (where # is the number of the group
with a damaged member), which will delete and re-create the members of a logfile group.
If the database is running in archivelog mode (and it should be), the logfile group must
have been archived before Oracle will permit execution of the clear logfile command.
This is because clearing an unarchived logfile group would mean that the archivelog
stream would be missing one logfile, and therefore that recovery would not be possible.
There is a variation on the command, ALTER DATABASE CLEAR UNARCHIVED
LOGFILE GROUP #, which will delete and re-create a logfile even if it has not been
successfully archived, but after executing this command it is absolutely vital to perform
a whole database backup.
The document says,
Use the CLEAR LOGFILE clause to reinitialize an online redo log, optionally without archiving the redo log. CLEAR LOGFILE is similar to adding and dropping a redo log, except that the statement may be issued even if there are only two logs for the thread and may be issued for the current redo log of a closed thread.
What I understood from your post is you didnt understand the meaning of the paragraph you posted.
Okay, lets clear this step by step.
This is related to redo logfile failures in different scenario . The scenario could be one of the given below in short.
1] Recovering after loss of all members of an INACTIVE Redo log group.
--> You can recreate the logfile using "alter database clear logfile...". First you need to check the status "ARCHIVED" = yes/no FROM v$log.
Then depending on that you need to use "alter database clear (unarchived) logfile group <n>" command. INACTIVE status means that the group is no
llonger needed for recovery.The command recreates all members of the group.
2] Recovering after loss of all members of an ACTIVE Redo log group.
--> As this group is required for recovery you must attempt to issue checkpoint to clear the logfile group with the above command.
Moreover if you loose the current redo log group you need to perform SCN based recovery.
Hope this will help.