一.问题说明
操作系统: RedHat 5.8

数据库: 11.2.0.3

2节点RAC.

使用RMAN 备份的时候,报如下错误:

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

这个问题只存在Oracle 11gR2以后的RAC 环境。

二.ORA-245 触发条件
在以下的5种环境下,会出现ORA-00245的错误。

2.1 RAC 环境下,自动备份备份控制文件,会因为ORA-245的错误而失败

Autobackup of controlfile in RMAN isfailing 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.2 RAC 环境下,备份控制文件到非共享的本地路径,也会失败
SQL> ALTER DATABASE BACKUP CONTROLFILETO '/u01/backup/control.bk' REUSE
*
ERROR at line 1:
ORA-245: control file backup operation failed

2.3 在RAC 环境下,创建standby controlfile 到非共享的本地路径也会失败
SQL> alter database create standby controlfileas '/home/oracle/renostdbycntrl.ctl';

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

2.4 在RAC 环境下,copy 当前的控制文件到本地路径
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

2.5 RAC 环境下,controlfile 快照备份到非共享位置,RMAN 备份也会失败
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

三. 错误原因

From 11gR2onwards, 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.

--从Oracle11gR2 开始,在备份控制文件时,不在需要锁住controlfile enqueue。对于非RAC 的数据库, 没有任何改变,但对于RAC 数据库,因为控制文件备份机制的改变,集群中的任何instance 可以需要写入到快照控制文件,因此snapshot controlfile需要对所有实例是可见的。

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.

--在RAC 环境下,如果snapshot controlfile 不在共享的位置,控制文件任何形式的都可能报ORA-245的错误。

The backup ofthe controlfile actualy makes a backup of the SNAPSHOT controlfile. TheSnapshot controlfile is created when the controlfile is about to be backed up.

--控制文件的备份实际上是生成一个SNAPSHOT controlfile,在备份时生成快照文件。

The Snapshot controlfile is a read-consistent copy of the controlfile.

--快照控制文件是控制文件的一个read-consistent copy。

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 timeof RMAN backup while taking snapshot of controlfile.

--快照控制文件必须能被所有节点访问,如果快照控制不是存放在共享设备上,那么在RMAN 进行控制文件的快照备份时就会报错。

This applies to backingup 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.

四. 解决方法

4.1. 检查快照控制文件位置
RMAN> show snapshot controlfile name;

4.2 配置snapshot controlfile 到共享位置
RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '<shared_disk>/snapcf_<DBNAME>.f';

如果使用了ASM,就指定到对应的ASM disk group:

RMAN>CONFIGURE SNAPSHOT CONTROLFILENAME TO '+<DiskGroup>/snapcf_<DBNAME>.f';

参考文档:

In RAC environment from 11.2 onwards BackupOr Snapshot controlfile needs to be in shared location[ID 1472171.1]

RMAN backup fails with Ora-00245 AndRman-08132 [ID 1365484.1]

RMAN BACKUP TO LOCAL DEVICE WITH SNAPSHOTON SHARED FAILS ORA-00245 [ID 1516654.1]

ORA-00245 control file backup operation failed 分析和解决的更多相关文章

  1. ORA-00245: control file backup failed; target is likely on a local file system (转载)

    环境:DB VERSION: 11.2.0.4.0RAC 2 nodes 问题:邮件显示rman备份失败,查看rman备份日志 Starting Control File and SPFILE Aut ...

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

    ORACLE11G RAC alert报错如下:Errors in file /u01/app/oracle/diag/rdbms/dljyzs/dljyzs1/trace/dljyzs1_ora_8 ...

  3. php中session_start()相关问题分析与解决办法

    介绍下,在php中使用session时遇到的一些问题,与相关解决方法.1.错误提示Warning: Cannot send session cookie - headers already sentW ...

  4. 【问题解决方案】git clone失败的分析和解决

    参考链接 git_clone资源获取失败解决 使用Git clone代码失败的解决方法 [Git] Clone failed 克隆失败的解决方法 问题描述: 无论是git clone还是pull,均失 ...

  5. composer在update时提示file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO

    在开发的时候,需要把依赖的服务更新到最新,然后 手动composer update一下,提示如下: failed) Update failed (The "e "https://a ...

  6. 10g ASM下修改control file的位置

    1.查看位置以及name是否正确 SQL> sho parameter name NAME TYPE VALUE ------------------------------------ --- ...

  7. control file sequential read 等待事件

    可能的原因 control file sequential read Reading from the control file. This happens in many cases. For ex ...

  8. ORA-01207: file is more recent than control file -

    OS: [root@yoon ~]# more /etc/oracle-releaseOracle Linux Server release 5.7 DB: Oracle Database 11g E ...

  9. Error: ORA-16501: the Data Guard broker operation failed ORA-16625: cannot reach database

    在备库上建配置文件 DGMGRL> create configuration 'sharkdbbork' as primary database is 'sharkdb' connect ide ...

随机推荐

  1. 哔哩哔哩直播录制工具v1.1.18

    软件介绍 看直播有时候非常精彩想要录制下来,或者非常喜欢某个主播想录制下直播全程,可去找录制软件的时候却发现有这样那样的问题,导致一番操作不尽人意.但是现在<B站直播录制工具>可以完美解决 ...

  2. 【Scrapy笔记】使用方法

    安装: 1.pip install wheel 安装wheel 2.安装Twisted a.访问 http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted ...

  3. C++线程详细说明

    一.问题的提出 编写一个耗时的单线程程序: 新建一个基于对话框的应用程序SingleThread,在主对话框IDD_SINGLETHREAD_DIALOG添加一个按钮,ID为IDC_SLEEP_SIX ...

  4. 6 个例子教你重构 Python 代码

    1. 合并嵌套的 if 条件 太多的嵌套会使代码难以理解,这在 Python 中尤为如此,因为 Python 没有括号来帮助区隔不同的嵌套级别. 阅读深度嵌套的代码容易让人烦躁,因为你必须理清哪些条件 ...

  5. windows Server 2016安装Sqlserver远程连接的坑

    如果要连接远程服务器 首先打开防火墙端口1433  新建入站规则 然后 如果没启用 就启用  然后重启服务就行 如果还是不行 进去属性  修改三处 然后重启服务

  6. Core3.0返回的Json数据大小写格式问题

    前言 测试发现,CoreWebAPI返回的Json数据,会将字段的首字母转换为小写, 经百度得,返回数据会默认驼峰命名,导致的. 随即百度, https://www.cnblogs.com/cdone ...

  7. matplotlib学习日记(八)----完善统计图

    (一)再说legend() import matplotlib.pyplot as plt import numpy as np x = np.arange(0, 2.1, 0.1) y = np.p ...

  8. Ubuntu不能直接从windows复制粘贴文件或文字

    终端输入: apt-get autoremove open-vm-tools sudo apt-get install open-vm-tools-desktop 然后重启电脑就可以了. 参考链接:h ...

  9. 微信小程序--关于加快小程序开发的几个小建议

    加快小程序开发的几个小建议 1.使用 app.json创建页面 ​ 按照我们平常的开发习惯,创建一个新的页面,一般都会先创建文件夹,再创建对应page的形式,创建完成后,app.json中会自动注册该 ...

  10. mysql数据安全之利用二进制日志mysqlbinlog恢复数据

    mysql数据安全之利用二进制日志mysqlbinlog恢复数据 简介:如何利用二进制日志来恢复数据 查看二进制日志文件的内容报错: [root@xdclass-public log_bin]# my ...