Oracle7 Server Administrator's Guide

Contents Index Home Previous Next

Clearing an Online Redo Log File

If you have enabled redo log block checking, Oracle7 verifies each block before archiving it. If a particular redo log block is corrupted in all members of a group, archiving stops. Eventually all the redo logs become filled and database activity is halted, until archiving can resume.

In this situation, you can use the SQL command ALTER DATABASE... CLEAR LOGFILE to clear the corrupted redo logs and avoid archiving them. The cleared redo logs are available for use even though they were not archived.

The following statement clears the log files in redo log group number 3:

ALTER DATABASE CLEAR UNARCHIVED LOGFILE
   GROUP 3;

Restrictions

You can clear a redo log file whether it is archived or not. However, when it is not archived, you must include the keyword UNARCHIVED.

If you clear a log file that is needed for recovery of a backup, then you can no longer recover from that backup. Oracle7 writes a message in the alert log describing the backups from which you cannot recover.

Attention: If you clear an unarchived redo log file, you should take another backup of the database.

If you want to clear an unarchived redo log that is needed to bring an offline tablespace online, you must use the clause UNRECOVERABLE DATAFILE in the ALTER DATABASE command.

If you clear a redo log needed to bring an offline tablespace online, you will not be able to bring the tablespace online again. You will have to drop the tablespace or perform an incomplete recovery.

See Also: For a complete description of the ALTER DATABASE command, see the Oracle7 Server SQL Reference.


Contents Index Home Previous Next