zoukankan      html  css  js  c++  java
  • ORA01152: file 1 was not restored from a sufficiently old backup

    RMAN> shutdown immediate

    database dismounted
    Oracle instance shut down

    RMAN> startup mount

    connected to target database (not started)
    Oracle instance started
    database mounted

    Total System Global Area     285212672 bytes

    Fixed Size                     1218968 bytes
    Variable Size                 83887720 bytes
    Database Buffers             192937984 bytes
    Redo Buffers                   7168000 bytes

    RMAN> restore database;

    Starting restore at 06-JAN-11
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=158 devtype=DISK

    datafile 9 not processed because file is offline
    skipping datafile 1; already restored to file /oracle/product/10.2.0/oradata/orcl/system01.dbf
    skipping datafile 2; already restored to file /oracle/product/10.2.0/oradata/orcl/undotbs01.dbf
    skipping datafile 4; already restored to file /oracle/product/10.2.0/oradata/orcl/users01.dbf
    skipping datafile 5; already restored to file /oracle/product/10.2.0/oradata/orcl/example01.dbf
    skipping datafile 8; already restored to file /oracle/product/10.2.0/oradata/orcl/user01.dbf
    skipping datafile 3; already restored to file /oracle/product/10.2.0/oradata/orcl/sysaux01.dbf
    skipping datafile 6; already restored to file /oracle/product/10.2.0/oradata/orcl/tzjh01.dbf
    skipping datafile 7; already restored to file /oracle/product/10.2.0/oradata/orcl/bid01.dbf
    restore not done; all files readonly, offline, or already restored
    Finished restore at 06-JAN-11

    RMAN> recover database;

    Starting recover at 06-JAN-11
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 01/06/2011 15:12:17
    RMAN-06094: datafile 9 must be restored

    同时我用sqlplus是这状态
    [oracle@server bdump]$ sqlplus / as sysdba

    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 6 15:12:47 2011

    Copyright (c) 1982, 2005, Oracle.  All rights reserved.


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

    SQL> select status from v$instance;

    STATUS
    ------------
    MOUNTED

    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-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/oracle/product/10.2.0/oradata/orcl/system01.dbf'

    RMAN> restore datafile 9;

    Starting restore at 06-JAN-11
    using channel ORA_DISK_1

    creating datafile fno=9 name=/oracle/product/10.2.0/oradata/orcl/user02.dbf
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 01/06/2011 15:14:59
    ORA-01178: file 9 created before last CREATE CONTROLFILE, cannot recreate
    ORA-01110: data file 9: '/oracle/product/10.2.0/oradata/orcl/user02.dbf'

    解决办法:
    控制文件重建
    SQL>startup nomount;
    SQL> CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS  ARCHIVELOG
      2  MAXLOGFILES 16
      3  MAXLOGMEMBERS 3
      4  MAXDATAFILES 100
      5  MAXINSTANCES 8
      6  MAXLOGHISTORY 292
      7  LOGFILE
      8  GROUP 1 '/oracle/product/10.2.0/oradata/orcl/redo01.log'  SIZE 50M,
      9  GROUP 2 '/oracle/product/10.2.0/oradata/orcl/redo02.log'  SIZE 50M,
    10  GROUP 3 '/oracle/product/10.2.0/oradata/orcl/redo03.log'  SIZE 50M
    11  DATAFILE
    12  '/oracle/product/10.2.0/oradata/orcl/system01.dbf',
    13  '/oracle/product/10.2.0/oradata/orcl/undotbs01.dbf',
    14  '/oracle/product/10.2.0/oradata/orcl/sysaux01.dbf',
    15  '/oracle/product/10.2.0/oradata/orcl/users01.dbf',
    16  '/oracle/product/10.2.0/oradata/orcl/example01.dbf',
    17  '/oracle/product/10.2.0/oradata/orcl/tzjh01.dbf',
    18  '/oracle/product/10.2.0/oradata/orcl/bid01.dbf',
    19  '/oracle/product/10.2.0/oradata/orcl/user01.dbf',
    20  '/oracle/product/10.2.0/oradata/orcl/user02.dbf',
    21  CHARACTER SET ZHS16GBK
    22  ;

    重建控制文件后
    SQL>recover database using backup controlfile;
      pecify log: {<RET>=suggested | filename | AUTO | CANCEL}
      auto
    执行完毕后
    SQL>shutdown immediate;
    SQL>startup;
    SQL>alter database open resetlogs;
    成功!!
    具体也可参照我的帖子:
    http://www.itpub.net/thread-1388122-1-1.html
  • 相关阅读:
    XAF 一对多关系<DC翻译博客二>
    XAF 在BOModel中实现接口<DC翻译博客六>
    XPO – (Gary's post)Stored Procedure Support Coming in V2010 Vol 2 Part1
    XAF 如何从Excel复制多个单元格内容到GridView
    XAF 如何实现对选择的单元格显示矩形框和多单元格的复制及粘贴
    XAF 如何扩展应用程序模型<二> 编辑ListView自动保存
    XAF 模型编辑器
    XAF 用代码扩展和自定义应用程序模型
    XAF 翻译领域构件(DC)技术目录
    XPO (Gary's post)Stored Procedure Support coming in V2010 Vol 2 (Part 2)
  • 原文地址:https://www.cnblogs.com/datalife/p/1985266.html
Copyright © 2011-2022 走看看