How to crosscheck and delete Expired Backups?


RMAN> crosscheck backup of database;
using channel ORA_DISK_1
crosschecked backup piece: found to be ‘EXPIRED’
backup piece handle=D:\STAGE\Dev_503\DATAFILE_BACKUP recid=79 stamp=475839783
crosschecked backup piece: found to be ‘EXPIRED’
backup piece handle=D:\STAGE\Dev_504\DATAFILE_BACKUP recid=137 stamp=475839784
crosschecked backup piece: found to be ‘AVAILABLE’
backup piece handle=D:\DGSTAGE\TSD_1_1 recid=132 stamp=475839755
crosschecked backup piece: found to be ‘AVAILABLE’
backup piece handle=D:\DGSTAGE\XQD62F_1_1 recid=133 stamp=475839756Crosschecked 4 objects

---------------------------------------------------------------------
Use the following Oracle RMAN command to delete an expired backup:
RMAN> delete expired backup of database;
using channel ORA_DISK_1
List of Backup Pieces
 BP Key BS Key Pc# Cp# Status Device Type Piece Name
 ——- ——- — — ———– ———– ———-
 79 79 1 1 EXPIRED DISK D:\STAGE\Dev_503\DATAFILE_BACKUP
 137 137 1 1 EXPIRED DISK D:\STAGE\Dev_504\DATAFILE_BACKUP
Do you really want to delete the above objects (enter YES or NO)? YES
 deleted backup piece
 backup piece handle=D:\STAGE\TSD_503\DATAFILE_BACKUP recid=79 stamp=475839783
 deleted backup piece
 backup piece handle=D:\STAGE\XQD_504\DATAFILE_BACKUP recid=137 stamp=475839784
 Deleted 2 EXPIRED objects

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: