归档模式下redo丢失或损坏(inactive状态)
1)inactive logfile损坏的情况
++++Session 1
SQL> select * from v$Log;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- ------------ ---------
1 1 0 52428800 512 1 YES UNUSED 1629032 29-DEC-15 1629391 29-DEC-15
2 1 17 20971520 512 1 NO CURRENT 1629391 29-DEC-15 2.8147E+14
3 1 15 52428800 512 1 YES INACTIVE 1629028 29-DEC-15 1629032 29-DEC-15
SQL> col member format a50
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------
1 ONLINE /u01/app/oracle/oradata/orcl/redo01.log NO
2 ONLINE /u01/app/oracle/oradata/orcl/redo02.log NO
3 ONLINE /u01/app/oracle/oradata/orcl/redo03.log NO
++++Session 2
[oracle@zw_test_26_75 trace]$ dd if=/dev/null of=/u01/app/oracle/oradata/orcl/redo03.log bs=512 count=10
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.00015951 s, 0.0 kB/s
SQL> startup
ORACLE instance started.
Total System Global Area 952020992 bytes
Fixed Size 2258960 bytes
Variable Size 314574832 bytes
Database Buffers 629145600 bytes
Redo Buffers 6041600 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 17653
Session ID: 145 Serial number: 3
alert_orcl.log报错
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/orcl/redo03.log'
ORA-27047: unable to read the header block of file
Linux-x86_64 Error: 25: Inappropriate ioctl for device
Additional information: 1
SQL> alter database clear logfile group 3;
Database altered.
SQL> alter database open;
Database altered.
或者直接删除日志,打开数据库后再重新添加;
SQL> alter database drop logfile group 3;
Database altered.
SQL> alter database open;
Database altered.
SQL> alter database add logfile group 3 ('/home/ora10g/oradata/roger/redo03.log') size 10m reuse;
Database altered.