ORA-01194: file 1 needs more recovery to be consistent
今天打开的时候不知怎么弄的,不能open了,先是提示数据库没有正常关闭,
run { startup force mount ;
2> set until time "to_date (' 2013-09-26 11:58:58 ',' YYYY-MM-DD hh24:mi:ss')" ;
3> restore database ;
4> recover database ;
5> sql ' alter database open resetlogs ' ;
6> }
使用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.
这样,就吧问题解决了。
阅读(4078) | 评论(0) | 转发(0) |