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
相关文章
|
关系型数据库 MySQL 数据库
|
关系型数据库 MySQL 数据库
|
关系型数据库 MySQL 数据库
|
Oracle 关系型数据库 Shell
[20171121]rman backup as copy 2.txt
[20171121]rman backup as copy 2.txt --//昨天测试backup as copy ,备份时备份文件的文件头什么时候更新.是最后完成后还是顺序写入备份文件.
1011 0
|
Oracle 关系型数据库 测试技术
[20171122]rman backup as copy的备份问题
[20171122]rman backup as copy的备份问题.txt --//以前曾经写过一篇[20160524]rman备份与检查点4.txt=>链接:http://blog.
1138 0
|
Oracle 关系型数据库 Linux
[20171121]rman backup as copy.txt
[20171121]rman backup as copy.txt --//上个星期做数据文件块头恢复时,提到使用rman备份数据文件时,文件头数据库信息是最后写入备份集文件的,在filesperset=1的情况 --//下写入备份集文件中的倒数第2块就是文件头的备份.
1225 0
|
Oracle 关系型数据库 数据库
[20170616]recover copy of datafile 6.txt
[20170616]no copy of datafile 6 found to recover.txt --//最近几天一直被这个问题纠缠,我虽然不知道问题在哪来,还是找到简单的解决方法,做1个记录: --//链接:http://www.
1150 0