自动备份的控制过旧,控制文件中没有备份的信息,且6号文件没在备份集中,有归档日志,这种情况要怎么恢复。
RMAN> list backup of datafile 6;specification does not match any backup in the repositoryRMAN> list backup;
List of Backup Sets
===================
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4       Incr 0  367.63M    DISK        00:02:44     02-APR-13
        BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: DAVE_LEV0
        Piece Name: /u01/app/backup/dave_lev0_0co62hbb_1_1_20130402
  List of Datafiles in backup set 4
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  2    0  Incr 1032216    02-APR-13 /u01/app/oracle/oradata/orcl/sysaux01.dbf
  3    0  Incr 1032216    02-APR-13 /u01/app/oracle/oradata/orcl/undotbs01.dbfBS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5       Incr 0  586.41M    DISK        00:02:52     02-APR-13
        BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: DAVE_LEV0
        Piece Name: /u01/app/backup/dave_lev0_0bo62hbb_1_1_20130402
  List of Datafiles in backup set 5
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1    0  Incr 1032215    02-APR-13 /u01/app/oracle/oradata/orcl/system01.dbf
  4    0  Incr 1032215    02-APR-13 /u01/app/oracle/oradata/orcl/users01.dbfBS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
8       12.38M     DISK        00:00:01     02-APR-13
        BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: ARC_BAK
        Piece Name: /u01/app/backup/arch_0fo62hhd_1_1_20130402  List of Archived Logs in backup set 8
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    7       1020672    01-APR-13 1032342    02-APR-13BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
9       391.00K    DISK        00:00:01     02-APR-13
        BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: ARC_BAK
        Piece Name: /u01/app/backup/arch_0go62hhe_1_1_20130402  List of Archived Logs in backup set 9
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    8       1032342    02-APR-13 1032365    02-APR-13BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
10      Full    9.33M      DISK        00:00:02     02-APR-13
        BP Key: 10   Status: EXPIRED  Compressed: NO  Tag: BAK_CTLFILE
        Piece Name: /u01/app/backup/ctl_file_0ho62hhi_1_1_20130402
  Control File Included: Ckp SCN: 1032428      Ckp time: 02-APR-13BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
11      Full    80.00K     DISK        00:00:00     02-APR-13
        BP Key: 11   Status: EXPIRED  Compressed: NO  Tag: SPFILE
        Piece Name: /u01/app/backup/dave_spfile_0io62hhl_1_1_20130402
  SPFILE Included: Modification time: 02-APR-13
  SPFILE db_unique_name: ORCLBS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
13      Full    9.36M      DISK        00:00:02     03-APR-13
        BP Key: 13   Status: AVAILABLE  Compressed: NO  Tag: TAG20130403T191651
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2013_04_03/o1_mf_s_811797411_8or3x4r5_.bkp
  SPFILE Included: Modification time: 03-APR-13
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1091457      Ckp time: 03-APR-13BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
14      Full    9.36M      DISK        00:00:05     03-APR-13
        BP Key: 14   Status: AVAILABLE  Compressed: NO  Tag: TAG20130403T202235
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2013_04_03/o1_mf_s_811801355_8or7rhhk_.bkp
  SPFILE Included: Modification time: 03-APR-13
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1094889      Ckp time: 03-APR-13BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
15      Full    9.36M      DISK        00:00:02     03-APR-13
        BP Key: 15   Status: AVAILABLE  Compressed: NO  Tag: TAG20130403T203239
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2013_04_03/o1_mf_s_811801959_8or8c920_.bkp
  SPFILE Included: Modification time: 03-APR-13
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1095662      Ckp time: 03-APR-13RMAN-06023

解决方案 »

  1.   

    如果有备份的控制文件,有所有的归档日志,可以通过alter database create datafile 6;
    来创建
      

  2.   

    SQL> alter database create datafile 6;
    alter database create datafile 6
    *
    ERROR at line 1:
    ORA-01178: file 6 created before last CREATE CONTROLFILE, cannot recreate
    ORA-01111: name for data file 6 is unknown - rename to correct file
    ORA-01110: data file 6: '/u01/app/oracle/product/11g/db_1/dbs/MISSING00006'
      

  3.   


    To re-create a datafile for recovery:Create a new, empty datafile to replace a damaged datafile that has no corresponding backup. For example, assume that the datafile disk1:users1 has been damaged, and no backup is available. The following statement re-creates the original datafile (same size) on disk2: ALTER DATABASE CREATE DATAFILE 'disk1:users1' AS 'disk2:users1';
                 
    This statement creates an empty file that matches the lost file. Oracle looks at information in the control file and the data dictionary to obtain size information. The old datafile is renamed as the new datafile. Perform media recovery on the empty datafile. For example, enter: RECOVER DATAFILE 'disk2:users1'
                 
    All archived redo logs written since the original datafile was created must be mounted and reapplied to the new, empty version of the lost datafile during recovery. 
      

  4.   

    SQL>  alter database create datafile '/u01/oracle/oradata/orcl/
      2  system01.dbf'  as '/u01/app/oracle/oradata/orcl/system01.dbf';
     alter database create datafile '/u01/oracle/oradata/orcl/
    *
    ERROR at line 1:
    ORA-01516: nonexistent log file, data file, or temporary file
    "/u01/oracle/oradata/orcl/
    system01.dbf"