Aug 10, 2011

rman delete

I have the following scenario. I have database backups I want to delete as I am recreating a database tomorrow morning, long story, but we have found a bug when running a block size of 16k.

I don't want to run the "RMAN DROP DATABASE INCLUDING BACKUPS NOPROMPT" command as the business testers want this environment back reasonably quickly.

What I did was:

unix> rman target /
rman> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
rman > DELETE NOPROMPT ALL;

Then it listed all the backup to remove, and I said "YES".

Now when I run the RMAN DROP DATABASE command tomorrow, it will complete in good time, not 2-3 hours it took to delete all my backups.