Solution: error cannot copy or restore to snapshot control file in RMAN

Step by step procedure:

$ rman target /

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name PRIM are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_prim.f'; # default -- (This file get created every database)

Try to delete the obsolete copy as below error shown

RMAN> delete expired copy;

allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=512 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=10 device type=DISK
specification does not match any datafile copy in the repository
specification does not match any archived log in the repository

List of Control File Copies
===========================
Key     S Completion Time Ckp SCN    Ckp Time
------- - --------------- ---------- ---------------
13      X 07-DEC-15       4957275    07-DEC-15
        Name: /u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_prim.f
        Tag: TAG20151207T024859
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_2 channel at 01/21/2017 12:33:35

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

For safer side make the SNAPSHOT backup

cd $ORACLE_HOME/dbs
snapcf_prim.f

$ cp snapcf_prim.f snapcf_prim.f.bck

Now configure the new snapshot with different name as shown below

$  rman target /

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snap_newprim.f';
old RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snap_prim.f';
new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snap_newprim.f';
new RMAN configuration parameters are successfully stored
Therefore perform the below operation to delete the exisiting snapshot copy & expired backup
RMAN> delete expired copy;

Hence deleted successully & I have verify the next day incremental backup of the database is created successfully

Comments

Popular posts from this blog

RAC Failure Scenario - Testing in our RAC Test DB - Node 1 & Node 2

ORA-01110: data file 1: '/oradata/datafiles/system01.dbf'

Expdp from Higher version 12c (12.1.0.2) to lower version 11g (11.2.0.4)