OS:
Oracle Linux Server release 5.7
DB:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
数据库打开模式,非归档模式,非当前日志损坏
SQL> archive log list;
Database log mode
Automatic archival
Archive destination
Oldest online log sequence
Current log sequence
SQL>
SQL> select * from v$log;
---------- ---------- ---------- ---------- ---------- ---------- -------- ---------------- ------------- ----------- ------------ -----------
[root@b28-122 yoon]# rm -rf redo01.log
[root@b28-122 yoon]# ls
control01.ctl
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> /
System altered.
执行dml语句,以及切换日志都能成功,但是数据库重启就报错
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup
ORACLE instance started.
Total System Global Area 3340451840 bytes
Fixed Size
Variable Size
Database Buffers
Redo Buffers
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 32731
Session ID: 1 Serial number: 5
SQL>
SQL> conn / as sysdba
Connected to an idle instance.
SQL> shutdown abort
ORACLE instance shut down.
SQL>
解决方法,数据库启动到mount,将损坏的日志文件清除日志组:
SQL> startup mount
ORACLE instance started.
Total System Global Area 3340451840 bytes
Fixed Size
Variable Size
Database Buffers
Redo Buffers
Database mounted.
SQL>
SQL> alter database clear logfile group 1;
Database altered.
SQL> alter database open;
Database altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 3340451840 bytes
Fixed Size
Variable Size
Database Buffers
Redo Buffers
Database mounted.
Database opened.
SQL>
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/u01/oracle/oradata/yoon/redo03.log
/u01/oracle/oradata/yoon/redo02.log
/u01/oracle/oradata/yoon/redo01.log
非归档模式,数据库关闭,不是正在使用的日志文件损坏,解决方法同上。