dataguard中出现gap后,采用基于scn的备份和恢复的方法进行恢复.
在恢复的过程中出现报错:
RMAN> recover database noredo;Starting recover at 05-FEB-20
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 02/05/2020 12:12:28
RMAN-06094: datafile 71 must be restored
查询数据字典 发现这个数据文件为新增的数据文件,standby端还没有此数据文件,所以需要先将此datafile进restore,否则无法recover.查找新增的数据文件sql如下:
SQL> select file#,name from v$datafile where creation_change#> =139323967;
解决办法:
找到所有gap之后新增的数据文件,例如71-77号数据文件,先备份进行restore:
原库:
RMAN> backup datafile 71,72,73,74,75,76,77 format '/rmanbak/backup/newfile_%U.bak';
在备库进行还原:
RMAN> restore datafile 71,72,73,74,75,76,77;
然后再进行recover即可.
RMAN> recover datafile noredo;
来源:CSDN
作者:久违的太阳
链接:https://blog.csdn.net/su377486/article/details/104180885