ITPub博客

首页 > 数据库 > Oracle > 如何在RAC环境中配置SNAPSHOT CONTROLFILE?

如何在RAC环境中配置SNAPSHOT CONTROLFILE?

原创 Oracle 作者:lovehewenyu 时间:2017-01-10 09:52:53 0 删除 编辑
如何在RAC环境中配置SNAPSHOT CONTROLFILE
ORA-00245: control file backup failed; target is likely on a local file system 问题解决(原题)

1.告警邮件发现数据库备份出现告警
ORA-00245: control file backup failed; target is likely on a local file system

2.分析ALERT日志
ORA-00245: control file backup failed=>问题对象:control file backup
target is likely on a local file system=>问题原因:local file system

基本问题已经确定,为了更准确定位问题,我们搜索了MOS。
ORA-245: In RAC environment from 11.2 onwards Backup Or Snapshot controlfile needs to be in shared location (文档 ID 1472171.1)
此文章核心内容:
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

3.解决办法
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+data/BMCDB/CONTROLFILE/snapcf_BMCDB1.f';
##一个节点执行,会自动同步到所有节点。

详细操作过程。

1.告警邮件
RMAN> backup 
2>     FORMAT 'cntrl_%s_%p_%t'
3> CURRENT CONTROLFILE;

Starting backup at 2017-01-10 09:28:00
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1299 instance=BMCDB1 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 01/10/2017 09:28:04
ORA-00245: control file backup failed; target is likely on a local file system

2.查看当前snapshot controlfile

2.1 节点1
RMAN> show snapshot controlfile name;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name BMCDB are:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/rac/oracle/product/11.2/dbs/snapcf_BMCDB1.f'; # default

2.2 节点2
RMAN> show snapshot controlfile name;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name BMCDB are:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/rac/oracle/product/11.2/dbs/snapcf_BMCDB2.f'; # default

3.更改CONFIGURE SNAPSHOT CONTROLFILE NAME

3.1 节点1
RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+data/BMCDB/CONTROLFILE/snapcf_BMCDB1.f';

new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+data/BMCDB/CONTROLFILE/snapcf_BMCDB1.f';
new RMAN configuration parameters are successfully stored

3.2 节点2
RMAN> show snapshot controlfile name;

RMAN configuration parameters for database with db_unique_name BMCDB are:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+data/BMCDB/CONTROLFILE/snapcf_BMCDB1.f';
##一个节点修改CONFIGURE SNAPSHOT CONTROLFILE NAME,其他节点自动同步。

4.SNAPSHOT CONTROLFILE 实际存放位置

修改前,没有SNAPSHOT CONTROLFILE 
ASMCMD> cd CONTROLFILE/
ASMCMD> ls -l
Type         Redund  Striped  Time             Sys  Name
CONTROLFILE  UNPROT  FINE     SEP 06 08:00:00  Y    Current.260.848073985
CONTROLFILE  UNPROT  FINE     SEP 06 08:00:00  Y    Current.261.848073985
ASMCMD> pwd
+data/BMCDB/CONTROLFILE
修改后,SNAPSHOT CONTROLFILE位置
ASMCMD> ls -l
Type         Redund  Striped  Time             Sys  Name
CONTROLFILE  UNPROT  FINE     JAN 10 09:00:00  Y    Backup.344.932895073
CONTROLFILE  UNPROT  FINE     SEP 06 08:00:00  Y    Current.260.848073985
CONTROLFILE  UNPROT  FINE     SEP 06 08:00:00  Y    Current.261.848073985
                                               N    snapcf_BMCDB1.f => +DATA/BMCDB/CONTROLFILE/Backup.344.932895073

5.验证控制文件备份
RMAN> backup
2> FORMAT 'cntrl_%s_%p_%t'
3> CURRENT CONTROLFILE;

Starting backup at 2017-01-10 09:31:13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 2017-01-10 09:31:14
channel ORA_DISK_1: finished piece 1 at 2017-01-10 09:31:17
piece handle=/oracle/rac/oracle/product/11.2/dbs/cntrl_39561_1_932895073 tag=TAG20170110T093113 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 2017-01-10 09:31:17

成功。

########################################################################################
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!【QQ交流群:53993419】
QQ:14040928 E-mail:dbadoudou@163.com
本文链接: http://blog.itpub.net/26442936/viewspace-2132164/
########################################################################################

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

请登录后发表评论 登录
全部评论
10年老鸟,Oracle,Mysql,EMC 存储,NBU备份

注册时间:2012-02-03

  • 博文量
    268
  • 访问量
    1299493