dg宕机重启后,MRP进程起不来,报ORA-01111(10g)或者ORA-01274(11g)错

问题背景:

客户dataguard宕机重启后,MRP进程因缺少数据文件起不来,

报错如下ORA-01111: name for data file 19 is unknown – rename to correct file


问题解决

1> 检查dataguard,sid已经正常启动,尝试启动MRP进程起不来,查看alert日志 (10g)

Errors in file /home/oracle/admin/oradb/bdump/zjport_mrp0_17798.trc:

ORA-01111: name for data file 19 is unknown – rename to correct file

ORA-01110: data file 19: ‘/home/oracle/product/10.2.0/db_1/dbs/UNNAMED00019’

ORA-01157: cannot identify/lock data file 19 – see DBWR trace file

ORA-01111: name for data file 19 is unknown – rename to correct file

ORA-01110: data file 19: ‘/home/oracle/product/10.2.0/db_1/dbs/UNNAMED00019’

MRP0: Background Media Recovery process shutdown (oradb)


查看alert日志发现datafile为19的数据库文件缺失,尝试重新创建

ALTER SYSTEM SET standby_file_management=’MANUAL’ SCOPE=BOTH;

alter database create datafile  ‘/home/oracle/product/10.2.0/db_1/dbs/UNNAMED00019’ as ‘/u01/oracle/oradata/oradb/test02.dbf’

ALTER SYSTEM SET standby_file_management=’AUTO’ SCOPE=BOTH;


重启MRP进程

ALTER DATABASE RECOVER  managed standby database disconnect from session parallel 12;


2> 如果是11g,报错可能如下

File #1103 added to control file as ‘UNNAMED01103’ because

the parameter STANDBY_FILE_MANAGEMENT is set to MANUAL

The file should be manually created to continue.

Errors with log /oradb/db_dg_arc/oradb/oradb_2_193066_899639967.arc

MRP0: Background Media Recovery terminated with error 1274

Errors in file /u01/oracle/diag/rdbms/oradb/oradb/trace/oradb_pr00_25640.trc:

ORA-01274: cannot add datafile ‘+oradb/oradb/datafile/sysaux_04.dbf’ – file could not be created

Managed Standby Recovery not using Real Time Apply

Recovery interrupted!


发现datafile为1103的数据文件确实,尝试重新创建

ALTER SYSTEM SET standby_file_management=’MANUAL’ SCOPE=BOTH;

alter database create datafile  ‘/u01/oracle/product/db11gr2/dbs/UNNAMED01103’ as ‘/sxbddj/sxbddjdat_u01/sxbddj/sysaux_04.dbf’;

ALTER SYSTEM SET standby_file_management=’AUTO’ SCOPE=BOTH;

ALTER DATABASE RECOVER  managed standby database disconnect from session parallel 12 ; 


3> 如果不知道文件编号所代表的数据文件是哪一个,可以从主库中获取

SQL> select name from v$datafile where file#=1103;

NAME

——————————————————————————–

oradb/oradb/datafile/sysaux_04.dbf


    原文作者:DBA_每日记
    原文地址: http://blog.itpub.net/69950231/viewspace-2660351/
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞