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

wxbtsinghua發表於2015-07-21
ORA-00245: control file backup failed; target is likely on a local file system   
         
問題:

郵件顯示rman備份失敗,檢視rman備份日誌

Starting Control File and SPFILE Autobackup at 2013-12-30 04:07:02
released channel: c1
released channel: c2
released channel: c3
released channel: c4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on c1 channel at 12/30/2013 04:07:05
ORA-00245: control file backup failed; target is likely on a local file system <---------

控制檔案自動備份失敗。大概意思是控制檔案的備份不應該放在本地檔案系統上。

解決辦法:

在rac一個節點的rman中,修改SNAPSHOT CONTROLFILE NAME引數指定到ASM共享儲存位置。
注意:在一個節點的rman中修改,會自動將改變同步到其他節點的rman中。

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+data1/xxxx/snapcf_xxx.f';

===========================================================================
以下根據metalink的相關文件整理
ORA-245: In RAC environment from 11.2 onwards Backup Or Snapshot controlfile needs to be in shared location (文件 ID 1472171.1)

錯誤原因:
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.
該問題會出現在11.2.0.1.0及之後的RAC環境中。

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. 

11gR2之後,備份控制檔案無需鎖定controlfile enqueue。在非Rac中,沒有任何改變。但是,在rac環境中,由於11gR2的控制檔案備份原理髮生了變化,叢集中的每個例項都要能夠寫到快照控制檔案。所以,快照控制檔案要對所有例項可見。


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備份快照控制檔案時,ORA-00245錯誤就會出現。

This applies to backing up controlfile using sqlplus / having autobackup of controlfile configured on nonshared 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.


下面操作都會引起ORA-245錯誤
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


解決辦法:
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';

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8551823/viewspace-1743007/,如需轉載,請註明出處,否則將追究法律責任。

相關文章