Tuesday, June 25, 2013

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

I got an below error while deleting the obsolete backup sets through the RMAN prompt.
ORA-19606: Cannot copy or restore to snapshot control file

RMAN> report obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Archive Log          580    20-JUN-13          /u01/app/oracle/admin/db1/arch/1_463_812203684.dbf
Archive Log          581    20-JUN-13          /u01/app/oracle/admin/db1/arch/1_464_812203684.dbf
Archive Log          582    20-JUN-13          /u01/app/oracle/admin/db1/arch/1_465_812203684.dbf
Archive Log          583    20-JUN-13          /u01/app/oracle/admin/db1/arch/1_466_812203684.dbf
Control File Copy     10     20-JUN-13          /u01/app/oracle/product/11.2.0/db_2/dbs/snapcf_db1.f
archived log file name=/u01/app/oracle/admin/db1/arch/1_486_812203684.dbf RECID=615 STAMP=818618879
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of delete command on ORA_DISK_1 channel at 06/25/2013 16:37:46
ORA-19606: Cannot copy or restore to snapshot control file

[oracle@oracle ~]$ oerr ora 19606
19606, 00000, "Cannot copy or restore to snapshot control file"
// *Cause:  A control file copy or restore operation specified the name of the
//          snapshot control file as the output file.  It is not permitted to
//          overwrite the snapshot control file in this manner.  Other
//          methods are available to create the snapshot control file.
// *Action: Specify a different file name and retry the operation.  If this
//          is a restore, then the restore conversation remains active and
//          more files may be specified.


Workaround.

The solution of this issue is to change the snapshot controlfile name. Thats what I did.

Except o/p. 
RMAN> show all;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_2/dbs/snapcf_db1.f'; # default

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_2/dbs/db1_ctl.f';
old RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_2/dbs/db1.ctl.f';
new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_2/dbs/db1_ctl.f';
new RMAN configuration parameters are successfully stored


RMAN> SHOW ALL;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_2/dbs/db1_ctl.f';


RMAN> delete noprompt obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=146 device type=DISK
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Control File Copy     10     20-JUN-13          /u01/app/oracle/product/11.2.0/db_2/dbs/snapcf_db1.f
Archive Log          619    20-JUN-13          /u01/app/oracle/admin/db1/arch/1_488_812203684.dbf
Archive Log          621    20-JUN-13          /u01/app/oracle/admin/db1/arch/1_489_812203684.dbf
Archive Log          625    20-JUN-13          /u01/app/oracle/admin/db1/arch/1_490_812203684.dbf

deleted control file copy
control file copy file name=/u01/app/oracle/product/11.2.0/db_2/dbs/snapcf_db1.f RECID=10 STAMP=818619160
....

...
Deleted 18 objects

RMAN> crosscheck backup;

using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/fast_recovery_area/DB1/backupset/2013_06_24/o1_mf_annnn_TAG20130624T115352_8whshs99_.bkp RECID=68 STAMP=818943059
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/app/oracle/fast_recovery_area/DB1/backupset/2013_06_24/o1_mf_annnn_TAG20130624T135040_8wj0brsm_.bkp RECID=74 STAMP=818949040
crosschecked backup piece: found to be 'AVAILABLE'


Good Day. Cheers... :)

1 comment: