ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORA-01190: control file or data file 1 is from before the last RESETLOGS

ORA-01190: control file or data file 1 is from before the last RESETLOGS

原创 Linux操作系统 作者:ilsyx 时间:2012-06-16 17:35:51 0 删除 编辑
模拟recover database until scn的时候,打开数据库出现了下面的错误.

[oracle@stu00 ~]$sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Fri Jun 15 09:18:45 2012

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01190: control file or data file 1 is from before the last RESETLOGS
ORA-01110: data file 1:
'/u01/app/oracle/product/10.2.0/db_1/oradata/testb/system01.dbf'


SQL>

(当前控制文件是上一次RESETLOGS的, 决定用ADJUST_SCN来调整SCN. 这个需要设置_allow_resetlogs_corruption参数, 前面曾经设置过就无需再设置.)

1.以下过程暂做记录. 并未全套实验验证明白.
SQL> ALTER SESSION SET EVENTS 'IMMEDIATE TRACE NAME ADJUST_SCN LEVEL 1';

Session altered.

SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area  285212672 bytes
Fixed Size                  1267068 bytes
Variable Size             125831812 bytes
Database Buffers          155189248 bytes
Redo Buffers                2924544 bytes
Database mounted.
SQL> recover until cance;
ORA-00277: illegal option to the UNTIL recovery flag CANCE


SQL> recover until cancel;
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done


SQL> recover using backup controlfile until cancel;
ORA-00279: change 1828434 generated at 06/13/2012 12:14:53 needed for thread 1
ORA-00289: suggestion :
/home/oracle/backup_testb/TESTB/archivelog/2012_06_15/o1_mf_1_80_%u_.arc
ORA-00280: change 1828434 for thread 1 is in sequence #80


Specify log: {=suggested | filename | AUTO | CANCEL}
AUTO
ORA-00279: change 1829020 generated at 06/13/2012 12:22:46 needed for thread 1
ORA-00289: suggestion :
/home/oracle/backup_testb/TESTB/archivelog/2012_06_15/o1_mf_1_81_%u_.arc
ORA-00280: change 1829020 for thread 1 is in sequence #81
ORA-00278: log file
'/home/oracle/backup_testb/TESTB/archivelog/2012_06_13/o1_mf_1_80_7xjvhs32_.arc'
no longer needed for this recovery



ORA-00279: change 1849840 generated at 06/13/2012 18:39:46 needed for thread 1
ORA-00289: suggestion :
/home/oracle/backup_testb/TESTB/archivelog/2012_06_15/o1_mf_1_1_%u_.arc
ORA-00280: change 1849840 for thread 1 is in sequence #1


ORA-00279: change 1870159 generated at 06/13/2012 18:48:09 needed for thread 1
ORA-00289: suggestion :
/home/oracle/backup_testb/TESTB/archivelog/2012_06_15/o1_mf_1_2_%u_.arc
ORA-00280: change 1870159 for thread 1 is in sequence #2
ORA-00278: log file
'/home/oracle/backup_testb/TESTB/archivelog/2012_06_13/o1_mf_1_1_7xjwhzj5_.arc'
no longer needed for this recovery


ORA-00279: change 1890603 generated at 06/13/2012 18:54:07 needed for thread 1
ORA-00289: suggestion :
/home/oracle/backup_testb/TESTB/archivelog/2012_06_15/o1_mf_1_3_%u_.arc
ORA-00280: change 1890603 for thread 1 is in sequence #3
ORA-00278: log file
'/home/oracle/backup_testb/TESTB/archivelog/2012_06_13/o1_mf_1_2_7xjwhzm5_.arc'
no longer needed for this recovery


ORA-00279: change 1890993 generated at 06/13/2012 18:57:03 needed for thread 1
ORA-00289: suggestion :
/home/oracle/backup_testb/TESTB/archivelog/2012_06_15/o1_mf_1_1_%u_.arc
ORA-00280: change 1890993 for thread 1 is in sequence #1


ORA-00279: change 1913598 generated at 06/13/2012 19:37:46 needed for thread 1
ORA-00289: suggestion :
/home/oracle/backup_testb/TESTB/archivelog/2012_06_15/o1_mf_1_2_%u_.arc
ORA-00280: change 1913598 for thread 1 is in sequence #2
ORA-00278: log file
'/home/oracle/backup_testb/TESTB/archivelog/2012_06_13/o1_mf_1_1_7xjywb79_.arc'
no longer needed for this recovery


ORA-00308: cannot open archived log
'/home/oracle/backup_testb/TESTB/archivelog/2012_06_15/o1_mf_1_2_%u_.arc'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3


SQL> SQL>
SQL> select file# from v$recover_file;

     FILE#
----------
         1
         2
         3
         4
         5
         6
         7

7 rows selected.

SQL> desc v$recover_file;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 FILE#                                              NUMBER
 ONLINE                                             VARCHAR2(7)
 ONLINE_STATUS                                      VARCHAR2(7)
 ERROR                                              VARCHAR2(18)
 CHANGE#                                            NUMBER
 TIME                                               DATE

SQL> select file#,online_status from v$recover_file;

     FILE# ONLINE_
---------- -------
         1 ONLINE
         2 ONLINE
         3 ONLINE
         4 ONLINE
         5 ONLINE
         6 ONLINE
         7 ONLINE

7 rows selected.

SQL> alter database open resetlogs;





资料参考来源:http://space.itpub.net/10648374/viewspace-615844

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

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

注册时间:2009-06-12

  • 博文量
    194
  • 访问量
    579863