您的位置:首页 > 数据库 > Oracle

ORA-00245 & RMAN-03009

2016-10-24 16:43 405 查看
巡检数据库中rman备份信息

SELECT SESSION_RECID,
       START_TIME,                   --开始时间
       END_TIME,                     --结束时间
       TIME_TAKEN_DISPLAY,           --耗时
       INPUT_TYPE,                   --备份类型
      TRIM(INPUT_BYTES_DISPLAY),    --输入块(所有块)大小
       TRIM(OUTPUT_BYTES_DISPLAY),   --输出块(需备份块)的大小
       STATUS                        --状态
  FROM V$RMAN_BACKUP_JOB_DETAILS
 WHERE START_TIME >= TRUNC(SYSDATE, 'dd');

发现数据库备份有异常(STATUS=‘FAILED’),随机查询备份日志

SELECT output
  FROM V$RMAN_OUTPUT
 WHERE session_recid='<session_resid>'

发现如下异常
Starting Control File and SPFILE Autobackup at 25-AUG-16
RMAN-00571: ===========================================================
RMAN-00569: ===========
4000
==== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on c1 channel at 08/25/2016 02:07:16
ORA-00245: control file backup failed; target is likely on a local file system
根据异常,查询MOS
MOS中有以下文档ORA-245: In RAC environment from 11.2 onwards Backup Or Snapshot controlfile needs to be in shared location (文档 ID 1472171.1),以下是引起的异常种类
1. In RAC environment controlfile autobackup fails with ora-0245

Autobackup of controlfile in RMAN is failing with error:
RMAN-571: ===========================================================
RMAN-569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-571: ===========================================================
RMAN-3009: failure of Control File and SPFILE Autobackup command on
ORA_DISK_1 channel at 10/27/2010 12:13:31
ORA-245: control file backup operation failed
 
 
2. In RAC environment, backup controlfile to non shared location fails
 
SQL> ALTER DATABASE BACKUP CONTROLFILE TO '/home/rac1122/test/control.bk' REUSE
*
ERROR at line 1:
ORA-245: control file backup operation failed
 
 
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
'/home/oracle/renostdbycntrl.ctl'
*
ERROR at line 1:
ORA-245: control file backup operation failed
 
 
4. In RAC environment copy current controlfile to '${DB_BACKUP_DIR}/rac_tnctv_control.bak';
 
channel ch1: starting datafile copy
copying current control file
RMAN-571: ===========================================================
RMAN-569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-571: ===========================================================
RMAN-3009: failure of backup command on 10/07/2011 11:36:42 channel at ch1
ORA-245: control file backup operation failed
 
 
5. In RAC environment, Rman backup fails if snapshot controlfile is not in shared location.
 
RMAN-00571: ========================================================
RMAN-00569: ============ ERROR MESSAGE STACK FOLLOWS =============
RMAN-00571: =========================================================
RMAN-03009: failure of resync command on default channel at 03/13/2012 10:19:41
ORA-00245: control file backup operation failed

根据里边给出的解决方案,做了如下校验
查看控制文件快照路径
RMAN> show snapshot controlfile name;

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/app/oracle/product/11.2/db_1/dbs/snapcf_gisdb1.f'; # default

发现存放路径是在本地,修改到shared disk中。

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+<DiskGroup>/snapcf_<DBNAME>.f';
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  oracle rman ORA 备份 rac