I did a refresh on a non-production database and these are the incarnations:
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 ORCL 1355555557 PARENT 1 20-DEC-11
2 2 ORCL 1355555557 CURRENT 12 17-JUL-14
How do I delete the backups from the old incarnation since they're not needed anymore?
Any help would be greatly appreciated.
Thanks.
Best Answer
I couldn't find any clause to the
REPORT
orLIST
commands which would allow you to specify the incarnation of interest.You could however correlate your latest incarnation reset time with backup completion time to identify the backups completed before your current incarnation began.
First, let's set the environment variables so that RMAN output also includes time.
Now let's examine which incarnations we have in RMAN repository.
It's shown in the output that our current incarnation's reset time is 5 August 2014 8:19 AM (
05.08.2014 08:19:38
).I have some backups completed before and after the current incarnation began.
Now we can list backups which were completed before the current incarnation began.
As you can see, only backups with completion time before the current incarnation's reset time are shown in the output.
After you narrowed down the backups to the ones whose completion time is before your current incarnation's reset time using
COMPLETED
subclause of theLIST
command, you can specify the same condition to theDELETE
command.There are also
AFTER
andBETWEEN
specifiers to theCOMPLETED
subclause. See the section Listing Selected Backups and Copies in Database Backup and Recovery User's Guide. An example ofBETWEEN
specifier usage:UPDATE
You can switch between incarnations using
RESET DATABASE TO INCARNATION n
command (check the scenarios of usage), but you'll always end up with the same output from theLIST
andREPORT
commands with respect to backup sets, no matter which incarnation you switch to.You can search Database Backup and Recovery Reference for the word "incarnation", to see when you can specify the incarnation and to which RMAN commands.