Delete a snapshot control file?

From Oracle Database Backup and Recovery User’s GuideWhen RMAN needs a read-consistent version of the control file, it creates a temporary snapshot control file. RMAN needs a snapshot control file when resynchronizing with the recovery catalog or when making a backup of the current control file.” Usually we see the snapshot control file created after a backup.

I wonder if anyone has ever come to a situation which needs to delete a snapshot of Oracle database control file?

Recently I have been working on a migration project which I need to move an Oracle 12c database from an old server to a new server. The backup location is on a NFS share. The same share will be used by the new server as well.

Although I mounted the share as a different path on the new server, I made a mistake here that I gave an inappropriate directory level for the new database backup (db_recovery_file_dest). Before I realized it, a nightly run backup was done.

So I used RMAN to delete everything I could such as copy, archive logs, autobackup of controlfile, backupset etc. Then I noticed the snapshot of the control file was not really registered and no way to delete it. Only the RMAN configuration had the reference of the location and the name. You can check that by using RMAN commands:

SHOW SNAPSHOT CONTROLFILE NAME;

SHOW ALL;

From Oracle’s guide “To delete a snapshot control file you must first change the snapshot control file location, then delete the file at the older location, as follows:

CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'new_name';
DELETE COPY OF CONTROLFILE;

That doesn’t really work with the command “DELETE COPY OF CONTROLFILE;” It will delete autobackup copies, but not the snapshot.

I could not find any RMAN commands to delete the snapshot of control file. I assume I just change the location or name if for whatever reason I don’t like them, then delete the actual at the OS level.

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 )

Connecting to %s