最近上线RAC环境,于是用expdp和rman做了2种方式的备份,rman备份策略是周日0级备份,周三1级增量备份,其他时间2级增量备。今日发现早上做的1级增量备份日志最后出现如下错误:
- Finished backup at 12-DEC-12
- Starting Control File and SPFILE Autobackup at 12-DEC-12
- released channel: c1
- released channel: c2
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03009: failure of Control File and SPFILE Autobackup command on c1 channel at 12/12/2012 02:23:53
- 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 失败了。
但是从
- Starting Control File and SPFILE Autobackup at 12-DEC-12
- released channel: c1
- released channel: c2
这一截看应该是备份完成再释放channel。通过在rman下用list backup of controlfile确认发现控制文件自动备份失败。
看了惜分飞的这篇文章 http://www.xifenfei.com/2648.html(和我遇到是同样的错误),中间有段话如下:
- RMAN creates a copy of the control file for read consistency, this is the snapshot controlfile.
- Due to the changes made to the controlfile backup mechanism in 11gR2 any instances
- in the cluster may write to the snapshot controlfile. Therefore,
- the snapshot controlfile file needs to be visible to all instances.
- The same happens when a backup of the controlfile is created directly from
- sqlplus any instance in the cluster may write to the backup controfile file.
- In 11gR2 onwards, the controlfile backup happens without holding the control file enqueue.
- For non-RAC database, this doesn't change anything.
- But, for RAC database, the snapshot controlfile location
- must be in a shared file system that will be accessible from all the nodes.
- The snapshot controlfile MUST be accessible by all nodes of a RAC database.
- 大致意思就是rman的snapshot controlfile必须放在共享存储之上。
解决方法
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到共享存储上面。持续观察一周,再看是否还报此错。待续。。。。。。
转载于:https://blog.51cto.com/2874575/1086400