How to get rid of archived redo logs and orphaned incarnations in the FRA
I have a database with a guaranteed restore point that testers reset to "baseline" after a few hours or a few days. Version 11.2.0.3, archivelog mode, FRA configured for everything.
After a few flashback database to restore point ...; alter database open resetlogs; I end up with many orphaned incarnations that I don't need, and the RMAN delete obsolete; won't get rid of the archived redo log files associated with these orphans. How do I cleanly get rid of all incarnations except for 1, 2, and 12 below (PARENT, PARENT, CURRENT) along with their archived redo log files?
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 SCRATCH1 1198706201 PARENT 1 17-SEP-11
2 2 SCRATCH1 1198706201 PARENT 995548 31-AUG-12
5 5 SCRATCH1 1198706201 ORPHAN 1380760 04-SEP-12
12 12 SCRATCH1 1198706201 CURRENT 1380760 19-SEP-12
7 7 SCRATCH1 1198706201 ORPHAN 1380760 04-SEP-12
8 8 SCRATCH1 1198706201 ORPHAN 1380760 05-SEP-12
9 9 SCRATCH1 1198706201 ORPHAN 1380760 06-SEP-12
10 10 SCRATCH1 1198706201 ORPHAN 1380760 06-SEP-12
11 11 SCRATCH1 1198706201 ORPHAN 1380760 17-SEP-12
4 4 SCRATCH1 1198706201 ORPHAN 1380760 04-SEP-12
3 3 SCRATCH1 1198706201 ORPHAN 1380760 04-SEP-12
6 6 SCRATCH1 1198706201 ORPHAN 1380760 04-SEP-12
RMAN>