RMAN-06100: no channel to restore a backup or copy of datafile
Tags: OraclermanRMAN-06100故障处理
现象
今天在还原一套rac库的时候,执行restore命令报错了:“RMAN-06100: no channel to restore a backup or copy of datafile”
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 02/12/2022 21:30:14 RMAN-06026: some targets not found - aborting restore RMAN-06100: no channel to restore a backup or copy of datafile 16 RMAN-06100: no channel to restore a backup or copy of datafile 15 RMAN-06100: no channel to restore a backup or copy of datafile 14 RMAN-06100: no channel to restore a backup or copy of datafile 13 RMAN-06100: no channel to restore a backup or copy of datafile 12 RMAN-06100: no channel to restore a backup or copy of datafile 11 RMAN-06100: no channel to restore a backup or copy of datafile 10 RMAN-06100: no channel to restore a backup or copy of datafile 9 RMAN-06100: no channel to restore a backup or copy of datafile 8 RMAN-06100: no channel to restore a backup or copy of datafile 7 RMAN-06100: no channel to restore a backup or copy of datafile 6 RMAN-06100: no channel to restore a backup or copy of datafile 5 RMAN-06100: no channel to restore a backup or copy of datafile 4 RMAN-06100: no channel to restore a backup or copy of datafile 3 RMAN-06100: no channel to restore a backup or copy of datafile 2 RMAN-06100: no channel to restore a backup or copy of datafile 1 |
过程
目标库之前有过相同的库,被我删除之后,重新进行恢复,应该进行catalog的时候注册了闪回日志或归档日志等最新的日志导致,查询目标库的incarnation:
1 2 3 4 5 6 7 8 9 | RMAN> list incarnation of database; List of Database Incarnations DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time ------- ------- -------- ---------------- --- ---------- ---------- 1 1 HQOMS 649681 PARENT 1 24-AUG-13 2 2 HQOMS 649681 PARENT 925702 26-NOV-19 3 3 HQOMS 649681 CURRENT 125411341949 15-NOV-21 |
查询源库的incarnation:
1 2 3 4 5 6 7 8 9 | RMAN> list incarnation of database; using target database control file instead of recovery catalog List of Database Incarnations DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time ------- ------- -------- ---------------- --- ---------- ---------- 1 1 HQOMS 649681 PARENT 1 24-AUG-13 2 2 HQOMS 649681 CURRENT 925702 26-NOV-19 |
发现,目标库多了一个incarnation。
解决
方法一:重置incarnation,然后进行restore操作:
1 2 3 4 5 | RMAN> reset database to incarnation 2; database reset to incarnation 2 |
方法二:删除相关的归档日志、在线日志和闪回日志等部分。
方法三:删除控制文件中的记录,重新进行注册:
1 2 3 4 5 6 7 | EXECUTE DBMS_BACKUP_RESTORE.RESETCFILESECTION(11); /** CLEAR V$ARCHIVED_LOG */ EXECUTE DBMS_BACKUP_RESTORE.RESETCFILESECTION(12); /** CLEAR V$BACKUP_SET */ EXECUTE DBMS_BACKUP_RESTORE.RESETCFILESECTION(13); /** CLEAR V$BACKUP_PIECE */ EXECUTE DBMS_BACKUP_RESTORE.RESETCFILESECTION(17); /** CLEAR V$BACKUP_CORRUPTION */ EXECUTE DBMS_BACKUP_RESTORE.RESETCFILESECTION(18); /** CLEAR V$COPY_CORRUPTION */ EXECUTE DBMS_BACKUP_RESTORE.RESETCFILESECTION(19); /** CLEAR V$DELETED_OBJECT */ EXECUTE DBMS_BACKUP_RESTORE.RESETCFILESECTION(28); /** CLEAR V$RMAN_STATUS */ |