代码改变世界

大小写导致rac数据库rman备份报ORA-00245错误

2022-04-22 22:09  abce  阅读(297)  评论(0编辑  收藏  举报

rac数据库rman备份报ORA-00245错误

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on t1 channel at 04/18/2022 11:42:27
ORA-00245: control file backup failed; target is likely on a local file system

RMAN> 


系统是RAC环境。从报错可看到,在自动备份控制文件的时候备份到了本地文件系统,而集群环境应该备份到共享路径。

查看一下rman设置

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name TEST are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 10 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+DATA/TEST/CONTR_AUTOBACKUP/conf_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+ABCE/test/snapcf_cprod1.f';

从查询结果看,这里是将快照控制文件备份到了共享目录'+ABCE/test/'

与报错信息中的提示还是有点不符合的。

 

通过asmcmd登录查看:

$ asmcmd
ASMCMD> cd +ABCE/test

可是并没有找到快照控制文件snapcf_cprod1.f
找不到快照文件这一点本身就有点蹊跷了。

 

退回到上一级目录

$ asmcmd
ASMCMD> cd +ABCE/test
ASMCMD> cd ..
ASMCMD> ls
TEST/

这个时候发现只有大写的TEST目录。

猜测是这里的大小写导致备份失败!!!

 

解决方案:
修改成大写的目录,和asmcmd看到的一致:

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+ABCE/TEST/snapcf_cprod1.f';

old RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+ABCE/test/snapcf_cprod1.f';
new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+ABCE/TEST/snapcf_cprod1.f';
new RMAN configuration parameters are successfully stored

RMAN>

再次执行备份,备份正常了。