ORA-01194: file 1 needs more recovery to be consistent

今天在做循序渐进oracle第421页的实验时,按照老盖的步骤居然打不开数据库!于是网上左右百度google,终于使用下面的方法解决!
使用shutdown immediate,等了一会没有结束,于是直接结束了进程,后来又出来一个问题
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: '/u01/app/oracle/oradata/orcl/system01.dbf'

估计应该是日志的问题,又试了下:
SYS@orcl>recover database using backup controlfile until cancel;
ORA-00279: change 747999 generated at 04/09/2014 15:03:10 needed for thread 1
ORA-00289: suggestion : /opt/oracle/archive/arch_1_46_808410282.dbf
ORA-00280: change 747999 for thread 1 is in sequence #46


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: '/opt/oracle/oradata/orcl/system01.dbf'

ORA-01112: media recovery not started

根据上面提示的内容,注意到 ‘change 747999’ 和 ‘sequence #46’
从网上看到一条语句,可以查出redo logs ,注意要用sys:
SQL> conn sys/oracle as sysdba                        
Connected.
SYS@orcl>select v1.group#, member, sequence#, first_change#
  2   from v$log v1, v$logfile v2
  3   where v1.group# = v2.group#;

    GROUP# MEMBER                                              SEQUENCE# FIRST_CHANGE#
---------- -------------------------------------------------- ---------- -------------
         1 /opt/oracle/oradata/orcl/redo01.log                         0             0
         3 /opt/oracle/oradata/orcl/redo03.log                         0             0
         2 /opt/oracle/oradata/orcl/redo02.log                         0             0;

从结果里根据 sequence# 和 first_change# 找到了要用到的log file name:
/opt/oracle/oradata/orcl/redo01.log

在 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} 下面输入:

/u01/app/oracle/oradata/orcl/redo03.log


SYS@orcl>recover database using backup controlfile until cancel;
ORA-00279: change 747999 generated at 04/09/2014 15:03:10 needed for thread 1
ORA-00289: suggestion : /opt/oracle/archive/arch_1_46_808410282.dbf
ORA-00280: change 747999 for thread 1 is in sequence #46


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/opt/oracle/oradata/orcl/redo01.log
Log applied.
Media recovery complete.

接着:
SYS@orcl>alter database open resetlogs;

Database altered.
  • 5
    点赞
  • 7
    收藏
  • 打赏
    打赏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:大白 设计师:CSDN官方博客 返回首页
评论 3

打赏作者

Linucle

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值