ORA-0024 5: control file backup failed; target is likely on a local file system
1.问题描述
警告日志报错如下:
Thu Feb 18 01:59:48 2016
Errors in file/u01/PSPROD/oracle/diag/rdbms/psprod/PSPROD1/trace/PSPROD1_ora_45856.trc:
ORA-00245: control file backup failed;target is likely on a local file system
Tue Feb 16 01:59:02 2016
Errors in file/u01/PSPROD/oracle/diag/rdbms/psprod/PSPROD1/trace/PSPROD1_ora_88792.trc:
ORA-00245: control file backup failed;target is likely on a local file system
2.问题分析
本报错出现于oracle 11.2.0.1.0及以后的版本中,应用于所有平台
仅仅RAC环境会发生,非rac环境不需要考虑这个问题,因为11Gr2控制文件备份机制的改变,集群中的任何实例都要可以写入快照文件。当然这个文件也就要对所有实例可见,所以这个快照文件要设置在共享设备上(asm磁盘组)。
我们现在看一下本机设置:
RMAN> show all;
RMAN configuration parameters for databasewith db_unique_name PSPROD are:
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICETYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FORDEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE ENCRYPTION FOR DATABASE OFF; #default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; #default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' ASOF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TONONE; # default
CONFIGURE SNAPSHOTCONTROLFILE NAME TO '/u01/PSPROD/oracle/product/11.2.0.4/dbs/snapcf_PSPROD1.f';# default
RMAN>
由上可见本机是默认的未进行修改过
因此会报245的错误
这里注意下本机报错为ORA-00245,但也可能报ora-245 所以在mos上搜索的时候最好报错内容也搜索下,否则可能找不到
3.解决方案
修改rman备份配置,将控制文件快照定向到共享磁盘组
[sql] view plain copy
- RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA_ERP/PSPROD/snapcf_PSPROD1.f';
- new RMAN configuration parameters:
- CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA_ERP/PSPROD/snapcf_PSPROD1.f';
- new RMAN configuration parameters are successfully stored
- RMAN>
检查修改结果:
RMAN> show all;
RMAN configuration parameters for databasewith db_unique_name PSPROD are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;# default
CONFIGURE BACKUP OPTIMIZATION OFF; #default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; #default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FORDEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 5BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICETYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FORDEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE ENCRYPTION FOR DATABASE OFF; #default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; #default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' ASOF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TONONE; # default
CONFIGURE SNAPSHOTCONTROLFILE NAME TO '+DATA_ERP/PSPROD/snapcf_PSPROD1.f';
RMAN>
注:只需要在RAC的一个节点上修改即可
MOS可参考:
ORA-245: In RAC environment from 11.2 onwards Backup Or Snapshot controlfile needs to be in shared location (文档 ID 1472171.1) |
转到底部 |
In this Document DescriptionOccurrence Symptoms Workaround Patches History References APPLIES TO:Oracle Database - Enterprise Edition - Version 11.2.0.1.0 and later DESCRIPTION1. In RAC environment controlfile autobackup fails with ora-0245 Autobackup of controlfile in RMAN is failing with error:
2. In RAC environment, backup controlfile to non shared location fails SQL> ALTER DATABASE BACKUP CONTROLFILE TO '/home/rac1122/test/control.bk' REUSE
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
4. In RAC environment copy current controlfile to '${DB_BACKUP_DIR}/rac_tnctv_control.bak'; channel ch1: starting datafile copy
5. In RAC environment, Rman backup fails if snapshot controlfile is not in shared location. RMAN-00571: ======================================================== OCCURRENCEOnly affect Real application Cluster (RAC), 11.2 onward. SYMPTOMSIn RAC environment any form of controlfile backup may fail with ORA-0245 if the location of the Snapshot Controlfile is not a shared location. The backup of the controlfile actualy makes a backup of the SNAPSHOT controlfile. The Snapshot controlfile is created when the controlfile is about to be backed up. The Snapshot controlfile is a read-consistent copy of the controlfile. NOTE: There is another issue in which this error occurs when the backup location is not shared, see RMAN BACKUP TO LOCAL DEVICE WITH SNAPSHOT ON SHARED FAILS ORA-00245 (Doc ID 1516654.1)
WORKAROUNDSOLUTION: 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'; PATCHESNA HISTORY02-07-2012 created and Published alert 07-12-2015 updated REFERENCESNOTE:1516654.1 - RMAN BACKUP TO LOCAL DEVICE WITH SNAPSHOT ON SHARED FAILS ORA-00245 |