This may be useful when you want to restore archive logs which were backed up more than once.
These archivelog files will be included in multiple backup sets in the RMAN catalog, by
default it will attempt to restore from the latest backup. But what if at the moment you have
tapes from earlier backup, or one of the files got corrupted and the latest backup has the
corrupted version? Here's what you do:
. oraenv
ORACLE_SID
rman
RMAN> connect target;
RMAN> connect catalog rman/password@CATDB;
RMAN> list backup of archivelog from logseq = 124349 until logseq = 124449;
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
5447 665M SBT_TAPE 00:03:35 12-JUL-07
BP Key: 6468 Status: AVAILABLE Compressed: NO Tag: TAG20070712T224403
Handle: /DBNAME.ARC.roimm89p_1_1/ Media: PCC401
List of Archived Logs in backup set 5447
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 124413 7338072204478 12-JUL-07 7338072246322 12-JUL-07
1 124414 7338072246322 12-JUL-07 7338072294914 12-JUL-07
1 124415 7338072294914 12-JUL-07 7338072328638 12-JUL-07
1 124416 7338072328638 12-JUL-07 7338072373031 12-JUL-07
1 124417 7338072373031 12-JUL-07 7338072443931 12-JUL-07
1 124418 7338072443931 12-JUL-07 7338072482427 12-JUL-07
1 124419 7338072482427 12-JUL-07 7338072528575 12-JUL-07
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
5461 95M SBT_TAPE 00:04:55 12-JUL-07
BP Key: 6482 Status: AVAILABLE Compressed: NO Tag: TAG20070712T224403
Handle: /DBNAME.ARC.s3imm8i4_1_1/ Media: PCC524
List of Archived Logs in backup set 5461
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 124349 7338033789154 12-JUL-07 7338033816533 12-JUL-07
....
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
38474 285M SBT_TAPE 00:01:14 24-JUL-07
BP Key: 38614 Status: AVAILABLE Compressed: NO Tag: TAG20070724T091359
Handle: /DBNAME.ARC.m9inkdob_1_1/ Media: PCC828
RMAN> change backupset 38474 unavailable;
changed backup piece unavailable
backup piece handle=/DBNAME.ARC.m9inkdob_1_1/ recid=109056 stamp=628766476
Changed 1 objects to UNAVAILABLE status
The completion time for backupset 38474 is 24-JUL-07 and the other backupsets completed on
12-JUL-07, in this case I want to restore from backup that took place on 12-JUL-07 so I made
the other backupset unavailable, and those tapes will not be used to restore archived log
files.
|