RMAN Delete

Delete backups (and copies) from disk or tape, and update the RMAN repository.

Syntax:

   DELETE [FORCE] [NOPROMPT] 
    { [EXPIRED] 
     { 
       { BACKUP [OF listObjectList]
       | COPY   [OF listObectjList] 
       | archivelogRecordSpecifier
       } [maintQualifier [maintQualifier]…]
     | recordSpec [DEVICE TYPE deviceSpecifier [, deviceSpecifier]…] 
     }
   | OBSOLETE [obsOperandList]
     [DEVICE TYPE (deviceSpecifier [, deviceSpecifier]…]
   };

 obsOperandList::=
     [ REDUNDANCY [=] integer | RECOVERY WINDOW OF integer DAYS | ORPHAN ]… 

 listObjectList::=
   [ DATAFILE datafileSpec [, datafileSpec]… 
   | TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]… 
   | archivelogRecordSpecifier 
   | DATABASE [SKIP TABLESPACE ['] tablespace_name ['] 
     [, ['] tablespace_name [']]…] 
   | CONTROLFILE
   | SPFILE
   ]…

Examples

 RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt;
 RMAN> CROSSCHECK BACKUP OF TABLESPACE user_data COMPLETED BEFORE 'SYSDATE-14';
 RMAN> DELETE NOPROMPT EXPIRED BACKUP OF TABLESPACE user_data COMPLETED BEFORE 'SYSDATE-14';
 RMAN> DELETE BACKUP OF DATABASE LIKE '/tmp%';
 RMAN> DELETE ARCHIVELOG ALL BACKED UP 2 TIMES TO DEVICE TYPE sbt;
 RMAN> DELETE BACKUPSET 101, 102, 103;
 RMAN> DELETE CONTROLFILECOPY '/tmp/cntrlfile.copy';
 RMAN> DELETE BACKUP OF SPFILE TABLESPACE users DEVICE TYPE sbt;

Delete backups and copies (and archived redo logs ) that will not be needed to perform any possible recovery of the database to any point in the last 7 days.
DELETE NOPROMPT OBSOLETE RECOVERY WINDOW OF 7 DAYS;

“Rejection is the greatest aphrodisiac” ~ Madonna

Related Oracle Commands:

CHANGE - Update the status of a backup in the RMAN repository.
CONFIGURE - Persistent RMAN settings.
CROSSCHECK - Check whether backup items still exist.
LIST - List backups and copies
REPORT - Report backup status: database, files, backups
SET - Settings for the current RMAN session.
SHOW - Display the current configuration


 
Copyright © 1999-2024 SS64.com
Some rights reserved