ORA-0245
经常有客户报错ORA-0245
1.11.2 rac环境, rman存在snap控制文件路径,默认是文件系统[非共享,导致备份控制文件报错]
解决方法:将snap路径配置到ASM磁盘组共享路径【nfs共享路径也行】;
2.遭遇bug 配置snap路径已经是asm共享目录,但是asm目录下没有snap文件,且无法创建成功!
解决方法: snap_名称写错误,应该是小写的snapcf_<Db_unique_name>.f
1.大部分是snap路径非共享存储
ORA-245: In RAC environment from 11.2 onwards Backup Or Snapshot controlfile needs to be in shared location (Doc ID 1472171.1) 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. This applies to backing up controlfile using sqlplus / having autobackup of controlfile configured on non shared location. 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 '/path/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 '/path/renostdbycntrl.ctl'; alter database create standby controlfile as '/path/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 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 /path/db_name_m000_24118.trc: ORA-19624: operation failed, retry possible ORA-19504: failed to create file "/path/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
解决方法
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';
2.遇到已经配置ASM共享存储路径,但是还是自动备份报错!
注意观察snap_xxx名称及大小写问题!
RMAN Backup Fails with ORA-00245 Having Duplicate Snapshot Controlfile Location Configured (Doc ID 2408922.1) RMAN backup fails with error: ORA-00245: control file backup failed; target is likely on a local file system,
though the location of snapshot control file is configured to a shared storage and if its a ASM storage the corresponding diskgroups are mounted. CAUSE When snapshot controlfile location is duplicated and has the directory or snapshot control file name in mixed
(both upper and lower) cases the bug 17879299 is hit leading to errors ORA-00245: control file backup failed; target
is likely on a local file system. RMAN> show all; using target database control file instead of recovery catalog ... #Snapshot CF's directory name in mixed cases and duplicated CONFIGURE SNAPSHOT CONTROLFILE NAME TO '<path>/SNAP/snapcf_<db_unique_name>.f'; CONFIGURE SNAPSHOT CONTROLFILE NAME TO '<path>/snap/snapcf_<db_unique_name>.f'; or #Snapshot CF name in mixed cases and duplicated CONFIGURE SNAPSHOT CONTROLFILE NAME TO '<path>/snapcf_<db_unique_name>.f'; CONFIGURE SNAPSHOT CONTROLFILE NAME TO '<path>/snapcf_<Db_unique_name>.f' SOLUTION RMAN> show all; RMAN> configure snapshot controlfile name clear; RMAN> configure snapshot controlfile name to '<path>_<<db_uniqe_name>>.cf'; RMAN> show all;
解决方法
1.观察是否都是小写,调整到都是小写,不要大小写混用; 2.观察snap_xxx 名称是否为db_unique_name 修改为db unique name名称!!!