RE: Rman 8i vs 9i question - delete obsolete

  • From: "Mercadante, Thomas F" <thomas.mercadante@xxxxxxxxxxxxxxxxx>
  • To: "'oracle-l@xxxxxxxxxxxxx'" <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 27 Feb 2004 13:20:23 -0500

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@xxxxxxxx]
Sent: Friday, February 27, 2004 1:07 PM
To: Oracle ListServ (oracle-l@xxxxxxxxxxxxx)
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

 

Other related posts: