11gR2 RAC RMAN备份问题------ORA-00245控制文件autobackup错误

Symptoms

客户RMAN备份报错,controlfile autobackup出错,错误如下:

 

11gR2 RAC RMAN备份问题------ORA-00245控制文件autobackup错误_第1张图片

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

以下几种情况均会出现ORA-00245错误:

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

Cause

在 11gR2 及更高版本中,控制文件的备份在执行时不会持有 CF enqueue。对于非 RAC 数据库,这不会造成任何影响。但是,对于 RAC数据库,由于在 11gR2 中控制文件备份机制发生了更改,集群中的任何实例都可以写入到 snapshot/backup(快照/备份)控制文件。因此,Snapshot(快照)控制文件需要对所有实例都可见。从 SQL*Plus 直接创建控制文件的备份时也存在这种情况。集群中的任何实例都可以写入到备份控制文件。控制文件备份,即使使用 SQL“alter database backup controlfile...”,也必须在共享设备上创建备份。
 
Snapshot(快照)控制文件必须可由 RAC 数据库的所有节点访问;如果 snapshot(快照)控制文件不在共享设备上,则在 RMAN备份获取控制文件的 snapshot(快照)时会引发错误。这适用于使用 SQL*Plus 备份控制文件和在非共享位置配置了控制文件自动备份的情况。
 
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
 
解决方案是将 Snapshot/backup(快照/备份)控制文件位置更改到共享设备上,否则将会失败,并出现 ORA-245: control file backup operation failed。

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-0245错误
 
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.

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


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

Snapshot controlfile是一个控制文件的read-consistent copy

Solution

RMAN> show snapshot controlfile name;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name HMES are:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/app/11g/dbs/snapcf_hmes2.f'; # default

/oracle/app/11g/dbs/snapcf_hmes2.f非共享,需要设置到共享目录,或者ASM上

2. Configure the snapshot controlfile to a shared disk:

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

Or in case of ASM use

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

本次设置为:

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

设置后,备份成功!

你可能感兴趣的:(rman,snapshot,RAC,controlfile,11gr2,ORA-00245)