Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Rman 8i vs 9i question - delete obsolete
Rick,
Here is how I do it. Run this while connected to the Rman catalog as the Rman user. Provide your database name when it asks for it. This script will select all backups that are more than 90 days old, and will generate a the Rman script to delete those backups from the catalog. You then simply run the resulting script thru Rman and the backups get purged. Feel free to modify any part of this that you need to - it's not copywrited! Hope this helps.
set heading off
set feedback off
set newpage 1
set pagesize 999
set linesize 60
spool Rman_Purge.rcv
select 'allocate channel for maintenance type ' || '''' || 'SBT_TAPE' ||
'''' || ';' from dual;
select 'change backuppiece '||bp.bp_key||' delete;'
from rc_backup_piece bp,rc_database db
where db.name = upper('%1')
and bp.db_id = db.dbid
and bp.start_time < sysdate-90
/
exit
Tom Mercadante
Oracle Certified Professional
-----Original Message-----
From: Rick Stephenson [mailto:RStephenson_at_Ovid.com]
Sent: Friday, February 27, 2004 1:07 PM
To: Oracle ListServ (oracle-l_at_freelists.org)
Subject: Rman 8i vs 9i question - delete obsolete
In 9i rman I can set the retention policy to whatever I want and delete all obsolete backups based on that setting.
I cannot find, however, a similar feature for 8i rman. Is there a way to set this, and if not, how does rman determine what an obsolete backup is?
Thanks,
Rick Stephenson
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.htmlReceived on Fri Feb 27 2004 - 12:17:41 CST
-----------------------------------------------------------------
![]() |
![]() |