Redo log 文件损坏或丢失,在启动数据库时在alert日志中会有如下错误:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/orcl/redo01.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
log group 1'/u01/app/oracle/oradata/orcl/redo01.log'丢失,首先确定该日志组状态:
SQL> select group#,sequence#,archived,status from v$log;
GROUP# SEQUENCE# ARC STATUS
---------- ---------- --- ----------------
1 1 YES INACTIVE
3 3 NO CURRENT
2 2 YES INACTIVE
log group 1为非当前联机日志,可以采用如下方法解决:
SQL> alter database clear logfile group 1;
Database altered.
SQL> alter database open;
Database altered.
如果该日志组还没有归档,可以使用下面命令强行clear,强行clear后最好作一次数据库的全备份
SQL>alter database clear unarchived logfile group 1;