Mir Sayeed Hassan – Oracle Blog

Oracle DBA – Tips & Techniques | Learn with real-time examples

  • Translate

  • It’s Me






  • My Certificates

  • Links

    My Acclaim Certification : Credly Profile
    My Oracle ACE Pro Profile

  • Achievements

    Awarded Top 100 Oracle Blogs from Worldwide - #RANK 39
  • VISITORS COUNT

  • Verified International Academic Qualification from World Education Service (WES)

    Verified International Academic Qualification from World Education Service (WES)

  • Jobs

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

Posted by Mir Sayeed Hassan on September 17th, 2017

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

Step by step procedure:

[code] $ rman target / [/code]

[code] RMAN> show all; [/code]

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

[code] RMAN> delete expired copy; [/code]

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

[code] cd $ORACLE_HOME/dbs [/code]

snapcf_prim.f

[code] $ cp snapcf_prim.f snapcf_prim.f.bck [/code]


Now configure the new snapshot with different name as shown below

[code] $  rman target / [/code]

[code] RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snap_newprim.f’; [/code]

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

[code] RMAN> delete expired copy; [/code]


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