RMAN: Delete obsolete backups but not obsolete archivelogs

Giganews Newsgroups
Subject: RMAN: Delete obsolete backups but not obsolete archivelogs
Posted by:  heal…@googlemail.com
Date: Wed, 6 May 2009

Hi all,

I want to delete only obsolete backups and not archivelogs due to the
fact that we have a 2 stage backup process, first to disk, then to
tape and I have 2 archive log locations, 1 on SAN and another on local
disk, so I wouldn't want to put all my eggs in one basket and keep my
backed up archive logs on the local disk in case there is a failure
before they get off to tape and in the case the tape backup fails,
because my RMAN disk backup area is on local disk.

I dont want to set recovery window to +7 days because I cant keep this
many backups on disk due to the size, although I can keep the logs.

I want to handle the archived logs myself by using something like:
delete archivelog all until 'sysdate-7'

Here is my backup script:

crosscheck archivelog all;
crosscheck backup;
crosscheck copy;
backup database;
backup archivelog all not backed up 2 times keep until time 'SYSDATE
restore database validate;
delete noprompt archivelog until time 'SYSDATE-7';
delete noprompt obsolete;
sql "create pfile from spfile";
sql "alter database backup controlfile to trace";

If anyone knows any way of doing this just using RMAN please let me