最近上线RAC环境,于是用expdp和rman做了2种方式的备份,rman备份策略是周日0级备份,周三1级增量备份,其他时间2级增量备。今日发现早上做的1级增量备份日志最后出现如下错误:

 
  
  1. Finished backup at 12-DEC-12
  2. Starting Control File and SPFILE Autobackup at 12-DEC-12 
  3. released channel: c1 
  4. released channel: c2 
  5. RMAN-00571: =========================================================== 
  6. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== 
  7. RMAN-00571: =========================================================== 
  8. RMAN-03009: failure of Control File and SPFILE Autobackup command on c1 channel at 12/12/2012 02:23:53 
  9. ORA-00245: control file backup failed; target is likely on a local file system 

从上面的日志片断中看得出,备份已完成,控制文件和spfile准备开始备份,释放channel c1、c2,然后说控制文件和spfile自动备份失败,目标好像是在本地文件系统上。

此处控制文件和spfile到底是否备份完成,我还不确定。

从显示的信息

  failure of Control File and SPFILE Autobackup command on c1 channel

看应该是备份spfile和controlfile 失败了。

 

但是从

  1. Starting Control File and SPFILE Autobackup at 12-DEC-12 
  2. released channel: c1 
  3. released channel: c2 

这一截看应该是备份完成再释放channel。通过在rman下用list backup of controlfile确认发现控制文件自动备份失败。

 

看了惜分飞的这篇文章 http://www.xifenfei.com/2648.html(和我遇到是同样的错误),中间有段话如下:

 
  
  1. RMAN creates a copy of the control file for read consistency, this is the snapshot controlfile. 
  2. Due to the changes made to the controlfile backup mechanism in 11gR2 any instances 
  3. in the cluster may write to the snapshot controlfile. Therefore, 
  4. the snapshot controlfile file needs to be visible to all instances. 
  5.   
  6. The same happens when a backup of the controlfile is created directly from 
  7. sqlplus any instance in the cluster may write to the backup controfile file. 
  8.   
  9. In 11gR2 onwards, the controlfile backup happens without holding the control file enqueue. 
  10. For non-RAC database, this doesn't change anything.  
  11.   
  12. But, for RAC database, the snapshot controlfile location 
  13. must be in a shared file system that will be accessible from all the nodes. 
  14.   
  15. The snapshot controlfile MUST be  accessible by all nodes of a RAC database
  16. 大致意思就是rman的snapshot controlfile必须放在共享存储之上。 
  17. 解决方法

    The snapshot controlfile MUST be accessible by all nodes of a RAC database,
    if the snapshot controlfile does not reside in on a shared device this error will raise.
     
    1. Check the snapshot controlfile location:
    RMAN> show all;
     
    2. Configure the snapshot controlfile to a shared disk:
    RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '<shared_disk>/snapcf_<DBNAME>.f' ;

于是我在rman 里面按上面方法配置snapshot controlfile到共享存储上面。持续观察一周,再看是否还报此错。待续。。。。。。