ORA-19693: 已包括备份片段
2015-12-25 15:57 abce 阅读(1800) 评论(0) 编辑 收藏 举报使用rman异机恢复数据时,报"ORA-19693: 已包括备份片段..."错误。
执行的rman命令:
RMAN> run{ 2> allocate channel t2 type disk; 3> set newname for datafile 'D:\APP\ADMINISTRATOR\ORADATA\YB\SYSTEM01.DBF' to 'C:\APP\ADMINISTRATOR\ORADATA\YB\SYSTEM01.DBF'; 4> set newname for datafile 'D:\APP\ADMINISTRATOR\ORADATA\YB\SYSAUX01.DBF' to 'C:\APP\ADMINISTRATOR\ORADATA\YB\SYSAUX01.DBF'; 5> set newname for datafile 'D:\APP\ADMINISTRATOR\ORADATA\YB\UNDOTBS01.DBF' to 'C:\APP\ADMINISTRATOR\ORADATA\YB\UNDOTBS01.DBF'; 6> set newname for datafile 'D:\APP\ADMINISTRATOR\ORADATA\YB\USERS01.DBF' to 'C:\APP\ADMINISTRATOR\ORADATA\YB\USERS01.DBF'; 7> set newname for datafile 'D:\APP\ADMINISTRATOR\ORADATA\YB\MC_DATA01.DBF' to 'C:\APP\ADMINISTRATOR\ORADATA\YB\MC_DATA01.DBF'; 8> set newname for datafile 'D:\APP\ADMINISTRATOR\ORADATA\YB\MC_DATA02.DBF' to 'C:\APP\ADMINISTRATOR\ORADATA\YB\MC_DATA02.DBF'; 9> set newname for datafile 'D:\APP\ADMINISTRATOR\ORADATA\YB\MC_DATA03.DBF' to 'C:\APP\ADMINISTRATOR\ORADATA\YB\MC_DATA03.DBF'; 10> set newname for datafile 'D:\APP\ADMINISTRATOR\ORADATA\YB\MC_INDEX01.DBF' to 'C:\APP\ADMINISTRATOR\ORADATA\YB\MC_INDEX01.DBF'; 11> set newname for datafile 'D:\APP\ADMINISTRATOR\ORADATA\YB\MC_INDEX02.DBF' to 'C:\APP\ADMINISTRATOR\ORADATA\YB\MC_INDEX02.DBF'; 12> set newname for datafile 'D:\APP\ADMINISTRATOR\ORADATA\YB\MC_INDEX03.DBF' to 'C:\APP\ADMINISTRATOR\ORADATA\YB\MC_INDEX03.DBF'; 13> set newname for datafile 'D:\APP\ADMINISTRATOR\ORADATA\YB\MC_DATA0101.DBF' to 'C:\APP\ADMINISTRATOR\ORADATA\YB\MC_DATA0101.DBF'; 14> set until sequence 225947665; 15> restore database; 16> switch datafile all; 17> recover database; 18> }
详细报错信息:
RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: restore 命令 (在 12/25/2015 12:43:34 上) 失败 ORA-19693: 已包括备份片段 C:\DATA\DB_1LQPCVBI_1_1
原因:
与BUG 4483368有关,通过list backup summary可以发现备份集有多个副本数
RMAN> list backup summary; 备份列表 =============== 关键字 TY LV S 设备类型 完成时间 段数 副本数 压缩标记 ------- -- -- - ----------- ---------- ------- ------- ---------- --- 991 B F A DISK 21-12月-15 1 3 NO TAG20151221T172922 993 B A A DISK 21-12月-15 1 3 NO TAG20151221T173416 995 B F A DISK 21-12月-15 1 3 NO TAG20151221T173433
解决方案:
1.查找出副本数大于1的备份集,如list backup summary
2.重命名对应的备份集,或者将备份集移动到其它某个位置
3.使用crosscheck backup检测出无效的备份集
4.使用delete noprompt expired backup删除无效备份集
5.使用CATALOG START WITH重新添加备份集
6.重新执行RMAN操作
RMAN> crosscheck backup tag 'TAG20151221T172922' ; 分配的通道: ORA_DISK_1 通道 ORA_DISK_1: SID=396 设备类型=DISK 交叉校验备份片段: 找到为 'EXPIRED' 备份片段句柄=D:\BACKUP\DATA\DB_1LQPCVBI_1_1 RECID=991 STAMP=899054964 交叉校验备份片段: 找到为 'AVAILABLE' 备份片段句柄=C:\DATA\DB_1LQPCVBI_1_1 RECID=997 STAMP=899377615 交叉校验备份片段: 找到为 'AVAILABLE' 备份片段句柄=C:\DATA\DB_1LQPCVBI_1_1 RECID=1000 STAMP=899382697 已交叉检验的 3 对象 RMAN> delete noprompt expired backup; 使用通道 ORA_DISK_1 备份片段列表 BP 关键字 BS 关键字 Pc# Cp# 状态 设备类型段名称 ------- ------- --- --- ----------- ----------- ---------- 991 991 1 1 EXPIRED DISK D:\BACKUP\DATA\DB_1LQPCVBI_1_1 已删除备份片段 备份片段句柄=D:\BACKUP\DATA\DB_1LQPCVBI_1_1 RECID=991 STAMP=899054964 1 EXPIRED 对象已删除 RMAN>