Oracle数据库全备进行恢复
进行到
run {
set until scn 2122286167;
restore database;
switch datafile all;
recover database;
}
报错
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/24/2015 10:43:03
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 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
所有操作都是按照文档进行,之前做过好多次测试都是正常的
RMAN> list backup of datafile 1;
结果显示当前datafile 1的所有备份都是有效的
测试环境运行list incarnation的记录;
RMAN> list incarnation;
使用目标数据库控制文件替代恢复目录
数据库原型列表
DB 关键字 Inc 关键字 DB 名 DB ID STATUS 重置 SCN 重置时间
------- ------- -------- ---------------- --- ---------- ----------
1 1 ORCL 1531109886 PARENT 1 30-3月 -10
2 2 ORCL 1531109886 CURRENT 947455 19-3月 -19
3 3 ORCL 1531109886 ORPHAN 2119035142 15-10月-21
生产库运行list incarnation的记录
RMAN> list incarnation;
使用目标数据库控制文件替代恢复目录
数据库原型列表
DB 关键字 Inc 关键字 DB 名 DB ID STATUS 重置 SCN 重置时间
------- ------- -------- ---------------- --- ---------- ----------
1 1 ORCL 1531109886 PARENT 1 30-3月 -10
2 2 ORCL 1531109886 CURRENT 947455 19-3月 -19
解决方式:
RMAN> reset database to incarnation 2;
RMAN>run {
set until scn 2122286167;
restore database;
switch datafile all;
recover database;
}
运行正常