/* * RESTORE ARCHIVELOGS to new location * FAILS WITH: restore not done; all files readonly, offline, or already restored */ rman RMAN>connect target RMAN>connect catalog rman/rman@RMANREP RMAN> run { 2> set archivelog destination to 'D:\arch'; 3> restore archivelog all; 4> } executing command: SET ARCHIVELOG DESTINATION Starting restore at 20-JUL-09 using channel ORA_DISK_1 archive log thread 1 sequence 22 is already on disk as file D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_17\O1_MF_1_22_561P2HS W_.ARC archive log thread 1 sequence 23 is already on disk as file D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_18\O1_MF_1_23_564CGL2 X_.ARC archive log thread 1 sequence 24 is already on disk as file D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_19\O1_MF_1_24_5668GSM K_.ARC archive log thread 1 sequence 25 is already on disk as file D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_19\O1_MF_1_25_566D0DB 8_.ARC archive log thread 1 sequence 26 is already on disk as file D:\ORADATA\DBS\PROD\ARCHIVES\ARC00026_0692474350.001 archive log thread 1 sequence 27 is already on disk as file D:\ORADATA\DBS\PROD\ARCHIVES\ARC00027_0692474350.001 archive log thread 1 sequence 28 is already on disk as file D:\ORADATA\DBS\PROD\ARCHIVES\ARC00028_0692474350.001 archive log thread 1 sequence 29 is already on disk as file D:\ORADATA\DBS\PROD\ARCHIVES\ARC00029_0692474350.001 (!! failure ==> ) restore not done; all files readonly, offline, or already restored Finished restore at 20-JUL-09 /* You have to uncatalog archivelogs you want to restore * to make RMAN not to check this files that are already restored in default destination */ RMAN> change archivelog all uncatalog; uncataloged archive log archive log filename=D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_17\O1_MF_1_22_561P2HSW_.ARC recid=1 stamp=692488821 uncataloged archive log archive log filename=D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_18\O1_MF_1_23_564CGL2X_.ARC recid=2 stamp=692576244 uncataloged archive log archive log filename=D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_19\O1_MF_1_24_5668GSMK_.ARC recid=3 stamp=692638715 uncataloged archive log archive log filename=D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_19\O1_MF_1_25_566D0DB8_.ARC recid=4 stamp=692642348 uncataloged archive log archive log filename=D:\ORADATA\DBS\PROD\ARCHIVES\ARC00026_0692474350.001 recid=5 stamp=692643714 uncataloged archive log archive log filename=D:\ORADATA\DBS\PROD\ARCHIVES\ARC00027_0692474350.001 recid=6 stamp=692643715 uncataloged archive log archive log filename=D:\ORADATA\DBS\PROD\ARCHIVES\ARC00028_0692474350.001 recid=7 stamp=692643746 uncataloged archive log archive log filename=D:\ORADATA\DBS\PROD\ARCHIVES\ARC00029_0692474350.001 recid=8 stamp=692656463 Uncataloged 8 objects RMAN> run { 2> set archivelog destination to 'D:\arch'; 3> restore archivelog all; 4> } executing command: SET ARCHIVELOG DESTINATION Starting restore at 20-JUL-09 using channel ORA_DISK_1 channel ORA_DISK_1: starting archive log restore to user-specified destination archive log destination=D:\arch channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=22 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=23 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=24 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=25 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=26 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=27 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=28 channel ORA_DISK_1: reading from backup piece D:\ORADATA\FRA\PROD\BACKUPSET\2009_07_19\O1_MF_ANNNN_TAG20090719T170227_56 6FD5QX_.BKP channel ORA_DISK_1: restored backup piece 1 piece handle=D:\ORADATA\FRA\PROD\BACKUPSET\2009_07_19\O1_MF_ANNNN_TAG20090719T170227_566FD5QX_.BKP tag=TAG20090719T17022 7 channel ORA_DISK_1: restore complete, elapsed time: 00:00:10 Finished restore at 20-JUL-09 /* * Now is it OK, catalog archivelogs back * in my case, I have two directories with archivelogs */ RMAN> catalog start with 'd:\oradata\dbs\PROD\archives'; searching for all files that match the pattern d:\oradata\dbs\PROD\archives List of Files Unknown to the Database ===================================== File Name: D:\ORADATA\DBS\PROD\archives\ARC00026_0692474350.001 File Name: D:\ORADATA\DBS\PROD\archives\ARC00027_0692474350.001 File Name: D:\ORADATA\DBS\PROD\archives\ARC00028_0692474350.001 File Name: D:\ORADATA\DBS\PROD\archives\ARC00029_0692474350.001 Do you really want to catalog the above files (enter YES or NO)? yes cataloging files... cataloging done List of Cataloged Files ======================= File Name: D:\ORADATA\DBS\PROD\archives\ARC00026_0692474350.001 File Name: D:\ORADATA\DBS\PROD\archives\ARC00027_0692474350.001 File Name: D:\ORADATA\DBS\PROD\archives\ARC00028_0692474350.001 File Name: D:\ORADATA\DBS\PROD\archives\ARC00029_0692474350.001 RMAN> catalog start with 'd:\oradata\fra\PROD\ARCHIVELOG'; searching for all files that match the pattern d:\oradata\fra\PROD\ARCHIVELOG List of Files Unknown to the Database ===================================== File Name: D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_17\O1_MF_1_22_561P2HSW_.ARC File Name: D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_18\O1_MF_1_23_564CGL2X_.ARC File Name: D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_19\O1_MF_1_24_5668GSMK_.ARC File Name: D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_19\O1_MF_1_25_566D0DB8_.ARC Do you really want to catalog the above files (enter YES or NO)? yes cataloging files... cataloging done List of Cataloged Files ======================= File Name: D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_17\O1_MF_1_22_561P2HSW_.ARC File Name: D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_18\O1_MF_1_23_564CGL2X_.ARC File Name: D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_19\O1_MF_1_24_5668GSMK_.ARC File Name: D:\ORADATA\FRA\PROD\ARCHIVELOG\2009_07_19\O1_MF_1_25_566D0DB8_.ARC