[oracle@server1 bin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 29 08:40:25 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.SQL> startupORACLE instance started.
Total System Global Area 2.0417E+10 bytes
Fixed Size 2240256 bytes
Variable Size 1.5891E+10 bytes
Database Buffers 4.4560E+9 bytes
Redo Buffers 69280563 bytesDatabase mounted.
ORA-00305: log 3 of thread 1 inconsistent; belongs to another database
ORA-00312: online log 3 thread 1: '+FDA1/dbservice1/redo03.log'
出现这个错误是因为在dbservice2上执行创建或变更重做日志的操作,但重做日志的地址却指向了dbservice1上的日志文件redo03.log,这个文件正好是dbservice1的当前重做日志文件。比如在dbservice2上执行了下面的语句
alter database drop logfile group 3;
ALTER DATABASE ALTER LOGFILE THREAD 1
GROUP 3 ('+FDA1/dbservice1/redo03.log') SIZE 52485760 reuse;
查看日志如下:
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC
---------- ---------- ---------- ---------- ---------- ---------- ---
STATUS FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
---------------- ------------- --------- ------------ ---------
1 1 2983 524857600 512 1 YES
INACTIVE 85628220 29-DEC-12 85644142 29-DEC-12
2 1 0 524857600 512 1 YES
UNUSED 0 0
3 1 2989 524857600 512 1 NO
CURRENT 85717298 29-DEC-12 2.8147E+14
此时任何对该Log的操作基本都无效,drop redo logfile
SQL> alter database drop logfile group 3;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01623: log 3 is current log for instance dbservice1(thread 1) - cannot drop
ORA-00312: online log 3 thread 1: '+FDA1/dbservice1/redo03.log'
使用recover database恢复数据库:
SQL> recover database until cancel
ORA-00279: chan