【ORACLE】ORA-00245: control file backup operation failed

楊奇龍發表於2011-08-23
從oracle 11.2.0.2.0開始,控制檔案的快照檔案必須能夠被所有節點的資料例項訪問到,並且必須放在共享的位置。否則,使用RMAN進行備份控制檔案的時候會報如下錯誤:
ORA-00245: control file backup operation failed。
當使用備份指令碼備份的時候,這個錯誤可能會導致備份工作中斷。
公司同事也正好遇到這個問題。 
METALINK 中的兩篇文件:
RAC BACKUP FAILS WITH ORA-00245: CONTROL FILE BACKUP OPERATION FAILED          [ID 1268725.1]
RMAN Snapshot Controlfile Must Reside on Shared Device for RAC database in 11G [ID 1263621.1]
解釋並解決了此問題!摘要如下:
"RMAN creates a copy of the control file for read consistency, this is the snapshot controlfile. Due to the changes made to the controlfile backup mechanism in 11gR2 any instances in the cluster may write to the snapshot controlfile. Therefore, the snapshot controlfile file needs to be visible to all instances.
The same happens when a backup of the controlfile is created directly from sqlplus any instance in the cluster may write to the backup controfile file.
In 11gR2 onwards, the controlfile backup happens without holding the control file enqueue. For non-RAC database, this doesn't change anything. 
But, for RAC database, the snapshot controlfile location must be in a shared file system that will be accessible from all the nodes."
當遇到此類問題時,警告日誌檔案會出現如下內容:
Alert log file content:
2011-08-20 00:11:53.650000 +02:00
Errors in file /opt/app/oracle/diag/rdbms/orcl/trace/cmsdb1_ora_15751.trc:
ORA-00245: control file backup operation failed
Trace File content:
Starting control autobackup
*** 2011-08-20 00:11:53.650
ORA-00245: control file backup operation failed
Got error: 245
Autobackup failed with following error
ORA-00245: control file backup operation failed
當前的控制檔案配置:
rman target /
show all;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_orcl.f'; # default
我們的環境中使用了asm,所以將控制檔案備份到ASM中。
使用如下配置解決此問題:
rman target /
Recovery Manager: Release 11.2.0.2.0 - Production on Tue Aug 21 10:00:33 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: CMSDB (DBID=1390673463)
RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+FLASH/SNCFORCL.ORA';
using target database control file instead of recovery catalog
new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+FLASH/SNCFORCL.ORA';
new RMAN configuration parameters are successfully stored
RMAN>

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

相關文章