How to fix when backup piece is not found when deleting obsolete backup piece?

As part of the RMAN script during backup to disk for example you may have a statement to delete the obsolete backups. And in cases when backup piece is not found the RMAN fails with the error shown below when it can’t delete the obsolete backup.

Example (portion of the script to delete obsolete backup):
run {
….
DELETE NOPROMPT OBSOLETE REDUNDANCY = 7;
}

Error message displayed when backup piece is not found.
RMAN-06207: WARNING: 2 objects could not be deleted for DISK channel(s) due
RMAN-06208: to mismatched status. Use CROSSCHECK command to fix status

This error can be fixed if the FORCE option is used when deleting obsolete backup, it will update the RMAN repository that the backup has been deleted regardless it was found or not.

run {
DELETE FORCE NOPROMPT OBSOLETE REDUNDANCY = 7;
}

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