1.1 incarnation问题

2019年6月14日报错:

RMAN-06026: 有些目标没有找到 - 终止还原

RMAN-06023: 没有找到数据文件4的副本来还原

RMAN-06023: 没有找到数据文件3的副本来还原

RMAN-06023: 没有找到数据文件2的副本来还原

RMAN-06023: 没有找到数据文件1的副本来还原

处理过程:

(1)run {

Allocate channel ch0 type 'sbt_tape';

send 'NB_ORA_CLIENT=10.0.3.221';

send 'NB_ORA_SERV=cjwlidcsvr48';

restore database validate;

}

在还原操作期间将自动创建数据文件 46

在还原操作期间将自动创建数据文件 47

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: restore 命令 (在 06/14/2019 15:26:14 上) 失败

RMAN-06026: 有些目标没有找到 - 终止还原

RMAN-06023: 没有找到数据文件4的副本来还原

RMAN-06023: 没有找到数据文件3的副本来还原

RMAN-06023: 没有找到数据文件2的副本来还原

RMAN-06023: 没有找到数据文件1的副本来还原

(2) RMAN> list incarnation;

数据库原型列表

DB 关键字  Inc 关键字 DB 名  DB ID            STATUS  重置 SCN  重置时间

------- ------- -------- ---------------- --- ---------- ----------

1       1       CJEASDB  1149593162       PARENT  1          30-3月 -10

2       2       CJEASDB  1149593162       PARENT  947455     22-12月-12

3       3       CJEASDB  1149593162       PARENT  4636168868 06-8月 -16

4       4       CJEASDB  1149593162       CURRENT 279488003632 09-4月 -19

 

RMAN>  reset database to incarnation 4;

 

将数据库重置为原型 4

(3)restore database;已经可以正常恢复数据文件。

1.2 db_recovery_file_dest问题

If we start a RESTORE database with a BACKUP controlfile and Flash Recovery Area is defined, RMAN execute and implicit crosscheck and catalog of all the objects in the Flash Recovery Area.

RMAN will catalog any objects in the Flash Recovery Area that will not be registered in the controlfile and if any of this files belongs to an incarnation different from CURRENT incarnation in the controlfile then changes controlfile CURRENT incarnation to the one found in the file that is being cataloged.

This prevents database from restoring backups that belong to old CURRENT incarnation.

RMAN considers backup availble for being restored if the backup incarnation and CURRENT incarnation in controlfile are the same.

根据如上论述,我认为可以清空归档日志目录db_recovery_file_dest,然后restore控制文件目录,最后重新restore尝试。