SQL> startup
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 520097360 bytes
Database Buffers 322961408 bytes
Redo Buffers 5132288 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 15444
Session ID: 1 Serial number: 5
查看警报日志文件:
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_lgwr_15340.trc:
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 Error: 2: No such file or directory
SQL> startup mount;
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 520097360 bytes
Database Buffers 322961408 bytes
Redo Buffers 5132288 bytes
Database mounted.
SQL> select group#,members,status from v$log;
GROUP# MEMBERS STATUS
---------- ---------- ----------------
1 1 INACTIVE
3 1 CURRENT
2 1 INACTIVE
已经从database buffer cache写入到data file中了,数据库不会发生数据丢失,此时只需要用clear重建日志组就可恢复:
SQL> alter database clear logfile group 1;
Database altered.
打开数据库:
Database altered.
SQL> select group#,members,status from v$log;
GROUP# MEMBERS STATUS
---------- ---------- ----------------
1 1 UNUSED
2 1 INACTIVE
3 1 CURRENT
另外,如果数据库处于archivelog mode ,且丢失的日志组未完成归档,那么使用如下命令强制清除:
alter database clear unarchived logfile group 1;