oracle数据库中clear,请教alter database clear unarchived logfile的用法。

书上说,此语句可以用于只有二个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 里的语法如下,看不懂,那位高手指教

c58e339c7046a1ffce9c5508745874fa.gif啥是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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值