帮同学处理一个物化视图问题,顺便发现alert日志中有以下报错:
Errors in file /u01/app/oracle/diag/rdbms/abce/abce/trace/abce_ora_381201.trc: ORA-01580: error creating control backup file /dbbak/abce/crtl_bak/snapcf_abce.f ORA-27040: file create error, unable to create file Linux-x86_64 Error: 2: No such file or directory
控制文件备份失败,提示文件或者目录不存在。
首先查看rman的默认配置。
RMAN> show all; using target database control file instead of recovery catalog RMAN configuration parameters for database with db_unique_name abce are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default 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 NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/dbbak/abce/crtl_bak/snapcf_abce.f'; RMAN>
重点看这一行:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/dbbak/abce/crtl_bak/snapcf_abce.f';
一般snapshot的format应该是快照控制文件的绝对路径,这里的配置格式是对的。
然后检查一下目录是否存在,通过检查发现,目录crtl_bak压根不存在。
顺便看了一下这个机器的备份日志,发现备份早就出问题了。