书上说,此语句可以用于只有二个log group的情况,而且可以用于当前组的清理。我试了一下,清理当前组的时候,出错:
SVRMGR> alter database clear unarchived logfile group 4;
alter database clear unarchived logfile group 4
*
ORA-01624: log 4 needed for crash recovery of thread 1
ORA-00312: online log 4 thread 1: 'D:\O815\ORADATA\ORACLE8\REDO4A.LOG'
ORA-00312: online log 4 thread 1: 'D:\O815\ORADATA\ORACLE8\REDO4C.LOG'
online help 里的语法如下,看不懂,那位高手指教
啥是closed thread,啥是opened thread?)
CLEAR LOGFILE
reinitializes an online redo log, optionally without archiving the redo log. CLEAR LOGFILE is similar to adding and dropping a redo log, except that the command may be issued even if there are only two logs for the thread and also may be issued for the current redo log of a closed thread.
UNARCHIVED
You must specify UNARCHIVED if you want to reuse a redo log that was not archived.
WARNING: Specifying UNARCHIVED makes backups unusable if the redo log is needed for recovery.
You cannot use CLEAR LOGFILE to clear a log needed for media recovery. If it is necessary to clear a log containing redo after the database checkpoint, you must first perform incomplete media recovery. The current redo log of an open thread can be cleared. The current log of a closed thread can be cleared by switching logs in the closed thread.
If the CLEAR LOGFILE command is interrupted by a system or instance failure, then the database may hang. If so, this command must be reissued once the database is restarted. If the failure occurred because of I/O errors accessing one member of a log group, then that member can be dropped and other members added.
UNRECOVERABLE DATAFILE
You must specify UNRECOVERABLE DATAFILE if the database has a datafile that is offline (not for drop) and if the unarchived log to be cleared is needed to recover the datafile before bringing it back online. In this case, you must drop the datafile and the entire tablespace once the CLEAR LOGFILE command completes.