Saturday, May 18, 2019

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


Your RMAN backup command may fail with ORA-00245 while backing up current control file as part of database backup. RMAN output along with the error message may look similar to the following. The highlighted in red is the actual cause of this error which I will explain later in this article and provide the solution for this.

11> sql "alter system switch logfile";
12> backup as compressed backupset format '/backup/mydb/arc_%U.rbf' archivelog all delete input;
13> delete force noprompt obsolete;
14> backup current controlfile format '/backup/mydb/ctl_%U.rbf';
15> }
allocated channel: dsk1
channel dsk1: SID=6301 instance=mydb1 device type=DISK
 
allocated channel: dsk2
channel dsk2: SID=6406 instance=mydb1 device type=DISK
channel dsk3: starting piece 1 at 2017-05-12 21:43:05
channel dsk4: starting compressed incremental level 0 datafile backup set
channel dsk4: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/mydb/undotbs01.dbf
input datafile file number=00006 name=+DATA/mydb/undotbs03.dbf
channel dsk4: starting piece 1 at 2017-05-12 21:43:05
channel dsk1: finished piece 1 at 2017-05-12 21:43:06
piece handle=/backup/mydb/ora_c8s438f9_1_1.rbf tag=TAG20170512T214305 comment=NONE
channel dsk1: backup set complete, elapsed time: 00:00:01
channel dsk1: starting compressed incremental level 0 datafile backup set
channel dsk1: specifying datafile(s) in backup set
RMAN-03009: failure of backup command on dsk1 channel at 05/12/2017 21:43:07
ORA-00245: control file backup failed; target is likely on a local file system
continuing other job steps, job failed will not be re-run
channel dsk1: starting compressed incremental level 0 datafile backup set
channel dsk1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel dsk1: starting piece 1 at 2017-05-12 21:43:07
channel dsk4: finished piece 1 at 2017-05-12 21:43:07
piece handle=/backup/mydb/ora_cbs438f9_1_1.rbf tag=TAG20170512T214305 comment=NONE
channel dsk4: backup set complete, elapsed time: 00:00:02
channel dsk1: finished piece 1 at 2017-05-12 21:43:08
piece handle=/backup/mydb/ora_cds438fb_1_1.rbf tag=TAG20170512T214305 comment=NONE
channel dsk1: backup set complete, elapsed time: 00:00:01
channel dsk3: finished piece 1 at 2017-05-12 21:43:52
piece handle=/backup/mydb/ora_cas438f9_1_1.rbf tag=TAG20170512T214305 comment=NONE
channel dsk3: backup set complete, elapsed time: 00:00:47
channel dsk2: finished piece 1 at 2017-05-12 21:44:12
piece handle=/backup/mydb/ora_c9s438f9_1_1.rbf tag=TAG20170512T214305 comment=NONE
channel dsk2: backup set complete, elapsed time: 00:01:07
released channel: dsk1
released channel: dsk2
released channel: dsk3
released channel: dsk4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on dsk1 channel at 05/12/2017 21:43:07
ORA-00245: control file backup failed; target is likely on a local file system

To solve this problem, we need to make sure that snapshot controlfile location is set to a shared location (shared file system, or ASM diskgroup) accessible to all RAC instances. Once configured, contorlfile backup should complete successfully without any error.
RMAN> show snapshot controlfile name;

RMAN configuration parameters for database with db_unique_name MYDB are:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0.4/db_1/dbs/snapcf_mydb.bak';

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+BACKUP/snapcf_mydb.bak';

old RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0.4/db_1/dbs/snapcf_mydba.bak';
new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+RECOC1/snapcf_mydb.bak';
new RMAN configuration parameters are successfully stored

No comments:

Post a Comment

Popular Posts - All Times