Oracle rman恢复遇到Error validating file dummy (36) in piece xxx: missing header

过程

用参数拉起实例后，还原控制文件，数据库拉起到 mount 状态，catalog start with xx 注册备份文件。

现象

执行 catalog start with xx 后，alert 日志出现以下信息

Copy
Thu May 14 11:18:24 2020
Setting recovery target incarnation to 2
Setting recovery target incarnation to 2
Error validating file dummy (14) in piece xxx: missing header
Expanded controlfile section 14 from 245 to 490 records
Requested to grow by 245 recards; added 3 blocks of records

执行还原脚本出现以下报错后退出

Copy
ORA-01180: can not create datafile 1
ORA-01110: data file 1: '+DATA/xxxx/datafile/system01.dbf'

解决过程

rman 中查看 incarnation

Copy
RMAN> list incarnation;

List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- ------ ------------------ ----------
1 1 ORCL 1446008355 PARENT 1 2014/12/26 14:31:00
2 2 ORCL 1446008355 CURRENT 17034938503292 2020/05/09 17:34:36

重置 incarnation 回 1

Copy
RMAN> reset database to incarnation 1;
database reset to incatnation 1

RMAN> list incarnation;

List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- ------ ------------------ ----------
1 1 ORCL 1446008355 CURRENT 1 2014/12/26 14:31:00
2 2 ORCL 1446008355 ORPHAN 17034938503292 2020/05/09 17:34:36

观察 alert 日志

Copy
Thu May 14 11:21:28 2020
Setting recovery target incarnation to 1

在执行还原脚本，还原成功