Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: purging old backupsets from recovery catalog
Phillip wrote:
> Anybody have a script handy to purge old backupsets from the recovery
> catalog? For example, it's not likely I'm going to be needing a
> backupset taken last year, so I want to purge that from rman. Thanks.
>
> --
> Phillip
>
Hello
Hope this is helping you.
After executing this script against the recovery catalog put the connect
and allocate channel command in front and the release channel command on
the back of the file and that run this script with rman.
set heading off;
set feedback off;
set pagesize 1000;
spool delete.tmp
select 'change backuppiece "' || piece.handle || '" delete;' from
rman.rc_backup_piece piece, rman.rc_database db
where piece.db_key=db.db_key and db.name='<DB_NAME>'
and piece.completion_time <= SYSDATE-<RETENTIIN_TIME>;
spool off;
quit;
regards
Hartmut Inerle Received on Fri Mar 14 2003 - 02:20:47 CST