您当前的位置: 首页 >  ar

ORA-00245: control file backup failed; target is likely on a local file system

发布时间:2018-05-23 21:59:12 ,浏览量:0

ORA-0024 5: control file backup failed; target is likely on a local file system
1.问题描述

警告日志报错如下:

 

Thu Feb 18 01:59:48 2016

Errors in file/u01/PSPROD/oracle/diag/rdbms/psprod/PSPROD1/trace/PSPROD1_ora_45856.trc:

ORA-00245: control file backup failed;target is likely on a local file system

Tue Feb 16 01:59:02 2016

Errors in file/u01/PSPROD/oracle/diag/rdbms/psprod/PSPROD1/trace/PSPROD1_ora_88792.trc:

ORA-00245: control file backup failed;target is likely on a local file system

2.问题分析

本报错出现于oracle 11.2.0.1.0及以后的版本中,应用于所有平台

仅仅RAC环境会发生,非rac环境不需要考虑这个问题,因为11Gr2控制文件备份机制的改变,集群中的任何实例都要可以写入快照文件。当然这个文件也就要对所有实例可见,所以这个快照文件要设置在共享设备上(asm磁盘组)。

我们现在看一下本机设置:

RMAN> show all;

RMAN configuration parameters for databasewith db_unique_name PSPROD are:

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

CONFIGURE ARCHIVELOG BACKUP COPIES FORDEVICE TYPE DISK TO 1; # default

CONFIGURE MAXSETSIZE TO UNLIMITED;

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 TONONE; # default

CONFIGURE SNAPSHOTCONTROLFILE NAME TO '/u01/PSPROD/oracle/product/11.2.0.4/dbs/snapcf_PSPROD1.f';# default

RMAN>

由上可见本机是默认的未进行修改过

因此会报245的错误

这里注意下本机报错为ORA-00245,但也可能报ora-245 所以在mos上搜索的时候最好报错内容也搜索下,否则可能找不到

3.解决方案

修改rman备份配置,将控制文件快照定向到共享磁盘组

[sql]   view plain  copy
  1. RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA_ERP/PSPROD/snapcf_PSPROD1.f';  
  2.   
  3. new RMAN configuration parameters:  
  4. CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA_ERP/PSPROD/snapcf_PSPROD1.f';  
  5. new RMAN configuration parameters are successfully stored  
  6.   
  7. RMAN>  

检查修改结果:

RMAN> show all;

 

RMAN configuration parameters for databasewith db_unique_name PSPROD 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 FORDEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 5BACKUP TYPE TO BACKUPSET;

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

CONFIGURE ARCHIVELOG BACKUP COPIES FORDEVICE TYPE DISK TO 1; # default

CONFIGURE MAXSETSIZE TO UNLIMITED;

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 TONONE; # default

CONFIGURE SNAPSHOTCONTROLFILE NAME TO '+DATA_ERP/PSPROD/snapcf_PSPROD1.f';

 

RMAN>

注:只需要在RAC的一个节点上修改即可

MOS可参考:

ORA-245: In RAC environment from 11.2 onwards Backup Or Snapshot controlfile needs to be in shared location (文档 ID 1472171.1)

转到底部

In this Document

Description

 

Occurrence

 

Symptoms

 

Workaround

 

Patches

 

History

 

References

APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.2.0.1.0 and later Information in this document applies to any platform. This issue is only applicable to RAC database. From 11gR2 onwards, the controlfile backup happens without holding the controlfile enqueue. For non-RAC database, this doesn't change anything. But for RAC database, due to the changes made to the controlfile backup mechanism in 11gR2, any instance in the cluster may write to the snapshot controlfile. Due to this snapshot controlfile need to be visible to all instances.  The snapshot controlfile MUST be accessible by all nodes of a RAC database, if the snapshot controlfile does not reside on a shared device error will be raised at the time of RMAN backup while taking snapshot of controlfile.  This applies to backing up controlfile using sqlplus / having autobackup of controlfile configured on non shared location. ORA-245 error message description ---------------------------------------- 00245, 00000, "control file backup operation failed" *Cause: Failed to create a control file backup because some process signaled an error during backup creation. *Action: Check alert files for further information. This usually happens because some process could not access the backup file during backup creation. Any process of any instance that starts a read/write control file transaction must have an access to the backup control file during backup creation.

DESCRIPTION

1. In RAC environment controlfile autobackup fails with ora-0245

Autobackup of controlfile in RMAN is failing with error: RMAN-571: =========================================================== RMAN-569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-571: =========================================================== RMAN-3009: failure of Control File and SPFILE Autobackup command on  ORA_DISK_1 channel at 10/27/2010 12:13:31 ORA-245: control file backup operation failed

 

2. In RAC environment, backup controlfile to non shared location fails

SQL> ALTER DATABASE BACKUP CONTROLFILE TO '/home/rac1122/test/control.bk' REUSE * ERROR at line 1: ORA-245: control file backup operation failed

 

3. In RAC environment backing up standby controlfile to non shared location fails

SQL> alter database create standby controlfile as '/home/oracle/renostdbycntrl.ctl';

alter database create standby controlfile as  '/home/oracle/renostdbycntrl.ctl' * ERROR at line 1: ORA-245: control file backup operation failed

 

4. In RAC environment copy current controlfile to '${DB_BACKUP_DIR}/rac_tnctv_control.bak';

channel ch1: starting datafile copy copying current control file RMAN-571: =========================================================== RMAN-569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-571: =========================================================== RMAN-3009: failure of backup command on 10/07/2011 11:36:42 channel at ch1 ORA-245: control file backup operation failed

 

5. In RAC environment, Rman backup fails if snapshot controlfile is not in shared location.

 RMAN-00571: ======================================================== RMAN-00569: ============ ERROR MESSAGE STACK FOLLOWS ============= RMAN-00571: ========================================================= RMAN-03009: failure of resync command on default channel at 03/13/2012 10:19:41 ORA-00245: control file backup operation failed

OCCURRENCE

Only affect Real application Cluster (RAC), 11.2 onward.

SYMPTOMS

In RAC environment any form of controlfile backup may fail with ORA-0245 if the location of the Snapshot Controlfile is not a shared location.    The backup of the controlfile actualy makes a backup of the SNAPSHOT controlfile. The Snapshot controlfile is created when the controlfile is about to be backed up.  The Snapshot controlfile is a read-consistent copy of the controlfile.

NOTE:  There is another issue in which this error occurs when the backup location is not shared, see RMAN BACKUP TO LOCAL DEVICE WITH SNAPSHOT ON SHARED FAILS ORA-00245 (Doc ID 1516654.1)

 

WORKAROUND

SOLUTION:

This is a RAC specific 'configuration' issue and the correct configuration is as described below

It is changed behaviour which requires that the snapshot controlfile in a RAC environment, is on a shared location. 

1. Check the snapshot controlfile location: 

RMAN> show snapshot controlfile name;

2. Configure the snapshot controlfile to a shared disk:

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/snapcf_.f';

Or in case of ASM use

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+/snapcf_.f';

PATCHES

 NA

HISTORY

 02-07-2012 created and Published alert

07-12-2015 updated

REFERENCES

NOTE:1516654.1 - RMAN BACKUP TO LOCAL DEVICE WITH SNAPSHOT ON SHARED FAILS ORA-00245  NOTE:16012614.8 - Bug 16012614 - ORA-245 on RMAN controlfile backup BUG:17824928 - ORA-00245 ERROR RMAN BACKUP WITH SNAPSHOT ON SHARED FAILS BUG:12311429 - ALTER DATABASE BACKUP CONTROLFILE FAILS WITH ORA-245 BUG:13085539 - ORA-245 OCCURS DURING RMAN COPY CORRENT CONTROLFILE. BUG:13780443 - CONTROLFILE BACKUP MUST RESIDE ON SHARED DEVICE WITH RAC DATABASE NOTE:265623.1 - RESYNC CATALOG fails with ORA-15045 BUG:10263733 - SNAPSHOT CONTROLFILE USED BY RMAN MUST RESIDE ON SHARED DEVICE FOR RAC DATABASE BUG:10252378 - CONTROLFILE AUTOBACKUP FAILS WITH ORA-00245: CONTROL FILE BACKUP OPERATION FAILE BUG:16012614 - ORA-245 ON RMAN CONTROLFILE BACKUP ON LOCAL DEVICE WITH SNAPSHOT ON SHARED

 

 

About Me

.............................................................................................................................................

● 本文作者:小麦苗,部分内容整理自网络,若有侵权请联系小麦苗删除

● 本文在itpub(http://blog.itpub.net/26736162/abstract/1/)、博客园(http://www.cnblogs.com/lhrbest)和个人微信公众号(xiaomaimiaolhr)上有同步更新

● 本文itpub地址:http://blog.itpub.net/26736162/abstract/1/

● 本文博客园地址:http://www.cnblogs.com/lhrbest

● 本文pdf版、个人简介及小麦苗云盘地址:http://blog.itpub.net/26736162/viewspace-1624453/

● 数据库笔试面试题库及解答:http://blog.itpub.net/26736162/viewspace-2134706/

● DBA宝典今日头条号地址:http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826

.............................................................................................................................................

● QQ群号:230161599(满)、618766405

● 微信群:可加我微信,我拉大家进群,非诚勿扰

● 联系我请加QQ好友(646634621),注明添加缘由

● 于 2018-05-01 06:00 ~ 2018-05-31 24:00 在魔都完成

● 最新修改时间:2018-05-01 06:00 ~ 2018-05-31 24:00

● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解

● 版权所有,欢迎分享本文,转载请保留出处

.............................................................................................................................................

● 小麦苗的微店:https://weidian.com/s/793741433?wfr=c&ifr=shopdetail

● 小麦苗出版的数据库类丛书:http://blog.itpub.net/26736162/viewspace-2142121/

● 小麦苗OCP、OCM、高可用网络班:http://blog.itpub.net/26736162/viewspace-2148098/

.............................................................................................................................................

使用微信客户端扫描下面的二维码来关注小麦苗的微信公众号(xiaomaimiaolhr)及QQ群(DBA宝典),学习最实用的数据库技术。

小麦苗的微信公众号小麦苗的DBA宝典QQ群2《DBA笔试面宝典》读者群小麦苗的微店

   小麦苗的微信公众号      小麦苗的DBA宝典QQ群2     《DBA笔试面试宝典》读者群       小麦苗的微店

.............................................................................................................................................

ico_mailme_02.png DBA笔试面试讲解群 《DBA宝典》读者群 欢迎与我联系

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26736162/viewspace-2155016/,如需转载,请注明出处,否则将追究法律责任。

关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    107766博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.2377s