DG 备库报ORA-01537

一:版本信息

操作系统版本 AIX 6109

数据库版本  11.2.0.3(PSU11)


二:错误描述

    同事再给主库加数据文件后,发现备库alert日志中出现如下错误:

<span style="color:#333333;">File #58 added to control file as 'UNNAMED00058' because it was
created under name already used in this database. Creation name:
'/data03/eggp/datafile/tbs_ds_logs_13.dbf' </span><span style="color:#ff0000;">>>>主库添加的文件名</span><span style="color:#333333;">
Errors with log /archlog/eggpdr/eggpdr_2_12468_848106811.dbf
MRP0: Background Media Recovery terminated with error 1537
Errors in file /apps/oracle/diag/rdbms/eggpdr/eggpdr/trace/eggpdr_pr00_52691164.trc:
ORA-01537: cannot add file '/data03/eggp/datafile/tbs_ds_logs_13.dbf' - file already part of database
Recovery interrupted!  </span><span style="color:#ff0000;">>>>停止备库的恢复管理</span><span style="color:#333333;">
Recovery stopped due to failure in applying recovery marker (opcode 17.30).
Datafiles are recovered to a consistent state at change 288618532262 but controlfile could be ahead of datafiles.
Tue Jan 20 17:30:02 2015
MRP0: Background Media Recovery process shutdown (eggpdr)
Tue Jan 20 17:59:51 2015</span>


三 :问题原因

  备库alert日志中的报错很清楚的告诉了我们备库报错的原因,因为在主库添加的数据文件'/data03/eggp/datafile/tbs_ds_logs_13.dbf' 再经过备库的db_file_name_convert参数转换成相应的备库文件名后,发现转换后的文件名在备库已经存在了,所以备库就报出ORA-01537,并且停止了备库的恢复管理。


四:解决方案

1.查看备库控制文件中58号文件的文件名

SQL> col name format a55;
SQL> select FILE#,NAME from v$datafile file#=58;

     FILE# NAME
---------- --------------------------------------------------
        58 /apps/oracle/product/11.2.0.3/db_1/dbs/UNNAMED00058

2.查看备库asm磁盘组剩余空间十分充足

set line 200 pagesize 200;
select group_number,name,state,type,total_mb/1024,free_mb/1024,trunc(((total_mb-free_mb)/total_mb*100),3) pct_used from v$asm_diskgroup;
##如果磁盘组空间不够先给磁盘组添加磁盘,注意添加磁盘后虽然显示可用空间已经增加,但asm正在进行rebalance,索引如果添加完磁盘以后想立即使用空间,可能依然会报空间不足。可以用如下语句监控rebalance过程: select * from V$ASM_OPERATION;


3.修改备库standby_file_management参数为manual

SQL> alter system set standby_file_management=manual;


4.手动添加58号文件

alter database create datafile '/apps/oracle/product/11.2.0.3/db_1/dbs/UNNAMED00058' as '+DATA4/eggpdr/datafile/tbs_ds_logs_99999.dbf' reuse;

5. 修改备库 standby_file_management参数为auto

SQL> alter system set standby_file_management=auto;

6.打开恢复管理

SQL> alter database recover managed standby database using current logfile disconnect;
alter database recover managed standby database using current logfile disconnect
*
ERROR at line 1:
ORA-01153: an incompatible media recovery is active
##打开恢复管理时报ORA-01153错误,查看发现当前没有MRP进程,执行alter database recover managed standby database cancel;后再次启动恢复管理,依然报上面的错,最后重启实例,再次打开恢复管理后正常。








你可能感兴趣的:(File,add,dg,cannot,ORA-01153,ORA-01537)