RAM> RESYNC CATALOG;
To check if backups on file system are deleted but still referenced in the rman catalog:
a) for backupset
RMAN> crosscheck backupset; allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=143 device type=DISK using channel ORA_SBT_TAPE_1 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=43mraiho_1_1 RECID=59 STAMP=766855736 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=44mrail9_1_1 RECID=60 STAMP=766855849 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=4cmraj7q_1_1 RECID=62 STAMP=766856442 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=4dmral4o_1_1 RECID=63 STAMP=766858392 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=4lmranr6_1_1 RECID=65 STAMP=766861158 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=4mmranun_1_1 RECID=66 STAMP=766861271 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=4nmrao37_1_1 RECID=67 STAMP=766861415 Crosschecked 7 objectsFor a specific device type
RMAN> crosscheck backupset device type sbt;b) for image copy
RMAN> crosscheck copy;
The crosscheck check if the backup still exists on file system; if not the backuppiece is marked as EXPIRED.
To list expired backupset :
RMAN> list expired backupset; RMAN> list expired backupset summary;
To list expired copy :
RMAN> list expired copy;
To delete expired backupset or copy:
RMAN> delete expired backupset; RMAN> delete expired copy;
It is also possible to check for obsolete backup. An obsolete backup is a backup that is not used to garantee the retention policy.
To check for obsolete backup :
RMAN> report obsolete;To delete obsolete backup :
RMAN> delete obsolete;