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

本文档详细记录了在使用RMAN进行数据备份和恢复时遇到ORA-19606错误的过程。该错误发生在尝试复制或恢复到快照控制文件时。通过执行`crosscheck copy`和`delete expired copy`命令,检查并删除过期的控制文件副本,然后调整快照控制文件的配置,包括重命名和清除快照控制文件设置,最终解决了问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

RMAN> crosscheck copy;

using target database control file insteadof recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=44 device type=DISK

specification does not match any datafilecopy in the repository

validation faild for control file copy

control file copy filename=/opt/oracle/product/11.2.0/dbs/snapcf_orcl.f RECID=3 STAMP=856022420

validation succeeded for archived log

archived log filename=/dbdat/orclprd/oracle/archivelog/1_8402_840379839.dbf RECID=23STAMP=858385729

validation succeeded for archived log

archived log filename=/dbdat/orclprd/oracle/archivelog/1_8403_840379839.dbf RECID=24STAMP=858414268

RMAN> delete expired copy;

released channel: ORA_DISK_1

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=44 device type=DISK

specification does not match any datafilecopy in the repository

specification does not match any archivedlog in the repository

List of Control File Copies

===========================

Key    S Completion Time     Ckp SCN    Ckp Time          

------- - ------------------- -----------------------------

3      X 2014-08-19 16:00:20 3033671887 2014-08-19 15:58:47

       Name: /opt/oracle/product/11.2.0/dbs/snapcf_orcl.f

       Tag: TAG20140819T160019

Do you really want to delete the aboveobjects (enter YES or NO)? y

RMAN-00571:===========================================================

RMAN-00569: =============== ERROR MESSAGESTACK FOLLOWS ===============

RMAN-00571:===========================================================

RMAN-03009: failure of delete command onORA_DISK_1 channel at 09/22/2014 09:18:22

ORA-19606: Cannot copy or restore tosnapshot control file

RMAN> show all;

RMAN configuration parameters for databasewith db_unique_name DB2 are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 2;

CONFIGURE BACKUP OPTIMIZATION OFF; #default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; #default

CONFIGURE CONTROLFILE AUTOBACKUP OFF; #default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FORDEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 1BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICETYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FORDEVICE 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' ASOF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE ARCHIVELOG DELETION POLICY TOSHIPPED TO ALL STANDBY;

CONFIGURE SNAPSHOT CONTROLFILE NAME TO'/opt/oracle/product/11.2.0/dbs/snapcf_orcl.f';

RMAN> CONFIGURE SNAPSHOT CONTROLFILENAME TO '/opt/oracle/product/11.2.0/dbs/snapcf_orcl.f.bak';

old RMAN configuration parameters:

CONFIGURE SNAPSHOT CONTROLFILE NAME TO'/opt/oracle/product/11.2.0/dbs/snapcf_orcl.f';

new RMAN configuration parameters:

CONFIGURE SNAPSHOT CONTROLFILE NAME TO'/opt/oracle/product/11.2.0/dbs/snapcf_orcl.f.bak';

new RMAN configuration parameters aresuccessfully stored

RMAN> exit

Recovery Manager complete.

[oracle@DB2 ~]$ cd/opt/oracle/product/11.2.0/dbs/

[oracle@DB2 dbs]$ ls

hc_orcl.dat lkDB2   orapwdg    snapcf_orcl.f

init.ora    lkORCL  orapworcl  spfileorcl.ora

[oracle@DB2 dbs]$ rm -rf snapcf_orcl.f

[oracle@DB2 dbs]$ rman target /

Recovery Manager: Release 11.2.0.1.0 -Production on Mon Sep 22 09:21:01 2014

Copyright (c) 1982, 2009, Oracle and/or itsaffiliates.  All rights reserved.

connected to target database: ORCL(DBID=1368160572)

RMAN> delete expired controlfilecopy'/opt/oracle/product/11.2.0/dbs/snapcf_orcl.f';

released channel: ORA_DISK_1

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=44 device type=DISK

List of Control File Copies

===========================

Key    S Completion Time     Ckp SCN    Ckp Time          

------- - ------------------- -----------------------------

3      X 2014-08-19 16:00:20 3033671887 2014-08-19 15:58:47

       Name: /opt/oracle/product/11.2.0/dbs/snapcf_orcl.f

       Tag: TAG20140819T160019

Do you really want to delete the aboveobjects (enter YES or NO)? y

deleted control file copy

control file copy filename=/opt/oracle/product/11.2.0/dbs/snapcf_orcl.f RECID=3 STAMP=856022420

Deleted 1 EXPIRED objects

RMAN> show all;

RMAN configuration parameters for databasewith db_unique_name DB2 are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 2;

CONFIGURE BACKUP OPTIMIZATION OFF; #default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; #default

CONFIGURE CONTROLFILE AUTOBACKUP OFF; #default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FORDEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 1BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICETYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FORDEVICE 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' ASOF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE ARCHIVELOG DELETION POLICY TOSHIPPED TO ALL STANDBY;

CONFIGURE SNAPSHOT CONTROLFILE NAME TO'/opt/oracle/product/11.2.0/dbs/snapcf_orcl.f.bak';

RMAN> CONFIGURE SNAPSHOT CONTROLFILENAME TO '/opt/oracle/product/11.2.0/dbs/snapcf_orcl.f';   

old RMAN configuration parameters:

CONFIGURE SNAPSHOT CONTROLFILE NAME TO'/opt/oracle/product/11.2.0/dbs/snapcf_orcl.f.bak';

new RMAN configuration parameters:

CONFIGURE SNAPSHOT CONTROLFILE NAME TO'/opt/oracle/product/11.2.0/dbs/snapcf_orcl.f';

new RMAN configuration parameters aresuccessfully stored

RMAN> CONFIGURE SNAPSHOT CONTROLFILENAME clear;

old RMAN configuration parameters:

CONFIGURE SNAPSHOT CONTROLFILE NAME TO'/opt/oracle/product/11.2.0/dbs/snapcf_orcl.f';

RMAN configuration parameters are successfullyreset to default value

关于快照控制文件的详解http://www.2cto.com/database/201310/250284.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值