1

我有一个 oracle 数据库,它有问题阻止它打开。

为了克服这些问题,我尝试了以下步骤:

首先我安装了数据库:

SQL> startup mount;
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.

Total System Global Area 1.2560E+10 bytes
Fixed Size          2171344 bytes
Variable Size        6878662192 bytes
Database Buffers     5670699008 bytes
Redo Buffers            8601600 bytes
Database mounted.

之后,我恢复数据库如下:

SQL> recover database until cancel;
ORA-00279: change 338584095 generated at 11/22/2016 08:41:55 needed for thread 1
ORA-00289: suggestion : /oracle/app/product/11g/db/dbs/arch1_9218_833801667.dbf
ORA-00280: change 338584095 for thread 1 is in sequence #9218


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/oracle/app/oradata/ora11g/system01.dbf'


ORA-01112: media recovery not started

在此之后,我尝试如下更改打开的数据库:

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/oracle/app/oradata/ora11g/system01.dbf'

最后我尝试恢复 system01 数据文件,如下所示:

SQL> recover datafile 1;
ORA-00283: recovery session canceled due to errors
ORA-00314: log 2 of thread 1, expected sequence# 9218 doesn't match 9215
ORA-00312: online log 2 thread 1: '/oracle/app/oradata/ora11g/redo02.log'

正如您在最终错误“ORA-00314: log 2 of thread 1, expected sequence# 9218 doesn't match 9215”中看到的那样,日志文件 redo02.log 和服务器之间存在序列不匹配。

这种不匹配是如何发生的,我该怎么做才能解决这个问题?

PS:由于无法打开数据库,无法切换日志文件,并且由于 redo02.log 是当前日志文件,因此无法删除或清理它。

SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIME
------------- ------------------
     1      1          0   52428800      1 NO  UNUSED
    338564041 22-NOV-16

     3      1          0   52428800      1 NO  UNUSED
    338544000 22-NOV-16

     2      1       9218   52428800      1 NO  CURRENT
338584094 22-NOV-16
4

0 回答 0