天天看點

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

巡檢時遇到錯誤如下:

alert日志:

Wed Dec 19 01:00:29 2018

Errors in file /oracle/base/diag/rdbms/usap/usap1/trace/usap1_ora_7078838.trc:

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

Wed Dec 19 03:12:31 2018

ALTER SYSTEM ARCHIVE LOG

/oracle/base/diag/rdbms/usap/usap1/trace/usap1_ora_7078838.trc 的資訊如下:

Trace file /oracle/base/diag/rdbms/usap/usap1/trace/usap1_ora_6357166.trc

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Data Mining and Real Application Testing options

ORACLE_HOME = /oracle/product/11.2.0.4

System name: AIX

Node name: jnpd-usap-dbrac-01

Release: 1

Version: 7

Machine: 00FB769F4C00

Instance name: usap1

Redo thread mounted by this instance: 1

Oracle process number: 92

Unix process pid: 6357166, image: oracle@jnpd-usap-dbrac-01 (TNS V1-V3)

*** 2019-01-18 03:13:18.387

*** SESSION ID:(7637.2713) 2019-01-18 03:13:18.387

*** CLIENT ID:() 2019-01-18 03:13:18.387

*** SERVICE NAME:(SYS$USERS) 2019-01-18 03:13:18.387

*** MODULE NAME:(rman@jnpd-usap-dbrac-01 (TNS V1-V3)) 2019-01-18 03:13:18.387

*** ACTION NAME:(0000012 STARTED114) 2019-01-18 03:13:18.387

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

下面為官方文檔:

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

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

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. 

從11 gR2開始,控制檔案備份将在不持有控制檔案隊列的情況下進行。對于非RAC資料庫,這不會改變任何事情。但是對于RAC資料庫,由于對11 gR2中的控制檔案備份機制所做的更改,叢集中的任何執行個體都可以寫入快照控制檔案。是以,快照控制檔案需要對所有執行個體都是可見的。

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. 

快照控制檔案必須可由RAC資料庫的所有節點通路,如果快照控制檔案不駐留在共享裝置上,則在RMAN備份時,在擷取快照控制檔案時将引發錯誤。

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-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'

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-3009: failure of backup command on 10/07/2011 11:36:42 channel at ch1

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

6. In RAC environment, with NO RMAN activity, but controlfile autobackup is being created by database structure change.  I.e., adding datafiles or a resize of datafiles with autoextend.  Alert.log shows:

2016-12-30 23:46:10.244000 +00:00

Errors in file /ora01/app/oracle/diag/rdbms/persprop/persprop5/trace/persprop5_m000_24118.trc:

ORA-19624: operation failed, retry possible

ORA-19504: failed to create file "/orabck/uhilsfmt/persprop1/rman/c-3364950485-20161230-00.cf"

ORA-27040: file create error, unable to create file

SVR4 Error: 2: No such file or directory

Additional information: 1

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)

According to bug 18073805 (closed as not a bug), ORA-00227 can also be raised from "alter database backup controlfile to <file>" when the location of the file is not shared.

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 '<shared_disk>/snapcf_<DBNAME>.f';

Or in case of ASM use

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

PATCHES

HISTORY

REFERENCES

BUG:12311429 - ALTER DATABASE BACKUP CONTROLFILE FAILS WITH ORA-245

NOTE:265623.1 - RESYNC CATALOG fails with ORA-15045

NOTE:1516654.1 - RMAN BACKUP TO LOCAL DEVICE WITH SNAPSHOT ON SHARED FAILS ORA-00245 

BUG:13085539 - ORA-245 OCCURS DURING RMAN COPY CORRENT CONTROLFILE.

BUG:13780443 - CONTROLFILE BACKUP MUST RESIDE ON SHARED DEVICE WITH RAC DATABASE

NOTE:16012614.8 - Bug 16012614 - ORA-245 on RMAN controlfile backup

BUG:17824928 - ORA-00245 ERROR RMAN BACKUP WITH SNAPSHOT ON SHARED FAILS

BUG:18073805 - ORA-227: CORRUPT BLOCK DETECTED IN CONTROL FILE

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