Wednesday, May 25, 2016

RMAN ORA-19606: Cannot copy or restore to snapshot control file

When RMAN needs to resynchronize the recovery catalog with 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.
The default location for the snapshot control file is platform-specific and depends on the Oracle home of each target database. For example, the default filename on some Linux platforms is $ORACLE_HOME/dbs/snapcf_@.f


RMAN> delete obsolete;

starting full resync of recovery catalog
full resync complete
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 3
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=188 device type=DISK
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Control File Copy     1123728 2016-JAN-19 14:33:21 /software/oratest/product/11.2.0/dbs/snapcf_TESTDB.f
Backup Set           1123715 2015-NOV-06 10:55:47

Do you really want to delete the above objects (enter YES or NO)? yes
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of delete command on ORA_DISK_1 channel at 05/25/2016 11:57:24
ORA-19606: Cannot copy or restore to snapshot control file


SOLUTION

Not sure why this happens, but the solution is to configure a different snapshot controlfile name so that RMAN can use that, thus allowing you to remove the “old” one. Then configure back to what you had:
configure snapshot controlfile name to '/tmp/it.f';
crosscheck controlfilecopy "/oracle/product/11.2.0.2/dbs/snapcf_P10AC.f";
delete expired controlfilecopy "/oracle/product/11.2.0.2/dbs/snapcf_P10AC.f";
delete noprompt obsolete;
configure snapshot controlfile name to '/oracle/product/11.2.0.2/dbs/snapcf_P10AC.f';