Wednesday, April 10, 2013

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



Full database backup of 2 node RAC database failed when its trying to run autobackup of controlfile.

##########################
#   Errors 
##########################


Starting Control File and SPFILE Autobackup at 2013-09-04:21:25:34
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on ORA_SBT_TAPE_1 channel at 09/04/2013 21:25:36
ORA-00245: control file backup failed; target is likely on a local file system


##########################
#   Command Used  
##########################

Controlfile Autobackup.

##########################
#   Informations  
##########################


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. 


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.


##########################
 Solution 
##########################

 configure snapshot controlfile name to '+ORALIN_RECO/snapcf_oralin.f';  

show snapshot controlfile name;

RMAN> show snapshot controlfile name;

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


configure snapshot controlfile name to '+ORALIN_RECO/snapcf_oralin.f';

RMAN> configure snapshot controlfile name to '+ORALIN_RECO/snapcf_oralin.f';

using target database control file instead of recovery catalog
new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+ORALIN_RECO/snapcf_oralin.f';
new RMAN configuration parameters are successfully stored.

After setting snapshot controlfile to Shared location (diskgroup) all the backups are successful.