ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORA-01194: file 1 needs more recovery to be consistent

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

原创 Linux操作系统 作者:it_wangych 时间:2009-09-13 11:13:09 0 删除 编辑
今天打开数据库的时候不知怎么弄的,不能open了,先是提示数据库没有正常关闭,
使用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'

估计应该是日志的问题,又试了下:
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 669109 generated at 09/12/2009 18:47:00 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_09_13/o1_mf_1_10_%u_.ar
c
ORA-00280: change 669109 for thread 1 is in sequence #10


Specify log: {=suggested | filename | AUTO | CANCEL}

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

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

在 Specify log: {=suggested | filename | AUTO | CANCEL} 下面输入:
/u01/app/oracle/oradata/orcl/redo03.log
提示:
Log applied.
Media recovery complete.

接着:
SQL> alter database open resetlogs;

Database altered.

这样,就吧问题解决了。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22021749/viewspace-614544/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-07-06

  • 博文量
    43
  • 访问量
    80339