解决 ORA-00305, ORA-00312以及ORA-01194, ORA-01110

[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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值