RMAN-06023: no backup or copy of datafile 1 found to restore

在ORACLE 10g数据库还原过程遭遇RMAN-06023: no backup or copy of datafile x found to restore,具体情况如下所示

.....................................................................................
File Name: /u03/flash_recovery_area/EPPS/archivelog/2015_01_26/o1_mf_1_10_bdcwsc6t_.arc
File Name: /u03/flash_recovery_area/EPPS/archivelog/2015_01_26/o1_mf_1_23_bdcxwwx6_.arc
File Name: /u03/flash_recovery_area/EPPS/archivelog/2015_01_26/o1_mf_1_16_bdcxwgmd_.arc
File Name: /u03/flash_recovery_area/EPPS/archivelog/2015_01_26/o1_mf_1_39_bdczfb6o_.arc
File Name: /u03/flash_recovery_area/EPPS/archivelog/2015_01_26/o1_mf_1_40_bdczzotd_.arc
File Name: /u03/flash_recovery_area/EPPS/archivelog/2015_01_26/o1_mf_1_19_bdcxwmoy_.arc
File Name: /u03/flash_recovery_area/EPPS/archivelog/2015_01_26/o1_mf_1_31_bdcyvsk0_.arc
 
using channel ORA_DISK_1
 
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/06/2015 21:56:26
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
 
RMAN>

clip_image001

在RMAN里面使用restore database validate验证备份时也报RMAN-06023错误

clip_image002

RMAN> list backup of datafile 1;
 
using target database control file instead of recovery catalog
 
List of Backup Sets
===================
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
46739   Full    1.75G      DISK        00:16:07     05-MAR-15      
        BP Key: 50263   Status: AVAILABLE  Compressed: YES  Tag: TAG20150305T010709
        Piece Name: /u03/flash_recovery_area/backup/backupsets/ora_df873514789_s46810_s1
  List of Datafiles in backup set 46739
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 17572554495 05-MAR-15 /u01/app/oracle/oradata/epps/system01.dbf
 
RMAN> list backup of datafile 3;
 
 
List of Backup Sets
===================
 
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
46736   Full    8.83G      DISK        00:52:30     05-MAR-15      
        BP Key: 50260   Status: AVAILABLE  Compressed: YES  Tag: TAG20150305T010709
        Piece Name: /u03/flash_recovery_area/backup/backupsets/ora_df873508030_s46807_s1
  List of Datafiles in backup set 46736
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  3       Full 17571362089 05-MAR-15 /u01/app/oracle/oradata/epps/sysaux01.dbf

clip_image003

[oracle@getlnx01 archivelog]$ ls /u03/flash_recovery_area/backup/backupsets/ora_df873508030_s46807_s1
 
/u03/flash_recovery_area/backup/backupsets/ora_df873508030_s46807_s1
 

检查备份文件,发现都是存在的,根本没有问题。最后检查发现是incarnation的问题,因为中间我对该数据库做了一次不完全恢复,做了resetlogs操作。

RMAN>  list incarnation;
 
 
List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       EPPS     2179993557       PARENT  1          30-JUN-05
2       2       EPPS     2179993557       PARENT  446075     19-JUL-09
3       3       EPPS     2179993557       CURRENT 16926695161 23-JAN-15

clip_image004

 

解决方法:

   重置数据库的incarnation到2,然后还原数据库,问题解决。关于incarnation的资料,可以参考官方资料7.6.2 Point-in-Time Recovery and Database Incarnations: Concepts

RMAN> reset database to incarnation 2;
 
database reset to incarnation 2

你可能感兴趣的:(backup)