重庆思庄Oracle、Redhat认证学习论坛

标题: dg备库恢复报:MRP0: Background Media Recovery terminated with error 1111 [打印本页]

作者: 郑全    时间: 2016-8-24 11:22
标题: dg备库恢复报:MRP0: Background Media Recovery terminated with error 1111
今天遇到一个怪问题,备库放归档的空间不够了,准备去删除备库的日志时,发现删除不了,提示备库没有应用日志了,检查备库的状态,
select open_mode from v$database;
为open read only
准备让其处于恢复模式,
sql >recover managed standby database disconnect from session;

在去检查,发现模式还是为read only方式open,没有for apply.

检查日志文件,发现以下错误:

Managed Standby Recovery not using Real Time Apply
MRP0: Background Media Recovery terminated with error 1111
Errors in file /u01/app/oracle/diag/rdbms/stdby/stdby/trace/stdby_pr00_8810.trc:
ORA-01111: 数据文件 93 名称未知 - 请重命名以更正文件
ORA-01110: 数据文件 93: '/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00093'
ORA-01157: 无法标识/锁定数据文件 93 - 请参阅 DBWR 跟踪文件
ORA-01111: 数据文件 93 名称未知 - 请重命名以更正文件
ORA-01110: 数据文件 93: '/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00093'
Slave exiting with ORA-1111 exception
Errors in file /u01/app/oracle/diag/rdbms/stdby/stdby/trace/stdby_pr00_8810.trc:
ORA-01111: 数据文件 93 名称未知 - 请重命名以更正文件
ORA-01110: 数据文件 93: '/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00093'
ORA-01157: 无法标识/锁定数据文件 93 - 请参阅 DBWR 跟踪文件
ORA-01111: 数据文件 93 名称未知 - 请重命名以更正文件
ORA-01110: 数据文件 93: '/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00093'
Recovery Slave PR00 previously exited with exception 1111
MRP0: Background Media Recovery process shutdown (stdby)
Completed: ALTER DATABASE RECOVER  managed standby database disconnect from session  

原来备库找不到需要的文件,把mrp进程给关闭了,

想起来了,这个备库对应的主库是rac,前面正好在主库增加了一个新的磁盘组,并增加了新的表空间,并把部分数据移动到该表空间去,但在作这个操作时,忘了需要修改备库的db_file_name_convert参数,因此,导致传到备库时,找不到对应的位置,就报这个错误了,但后面主库因为其他原因又把这个表空间删除了,导致主库没有这个文件,备库又一直找这个文件,查看备库信息:
SQL>      select name,file# from v$datafile where file#=93;
NAME
--------------------------------------------------------------------------------
     FILE#
----------
/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00093
        93

那怎么办呢,看到网上有个类似的案例,就是能否把备库的这个数据字典的信息先删除,看能够把 mrp启动起来,

尝试删除93号文件:
alter database datafile 93 offline drop;
成功,
然后,再去让数据库处于恢复模式:

sql >recover managed standby database disconnect from session;

这次,居然成功了,
检查数据库状态:
SQL> select open_mode from V$database;
OPEN_MODE
--------------------
READ ONLY WITH APPLY

,再去看报警日志,发现已经开始进行日志应用了:
alter database datafile 93 offline drop
Completed: alter database datafile 93 offline drop
ALTER DATABASE RECOVER  managed standby database disconnect from session  
Attempt to start background Managed Standby Recovery process (stdby)
Wed Aug 24 10:55:00 2016
MRP0 started with pid=47, OS id=8833
MRP0: Background Managed Standby Recovery process started (stdby)
started logmerger process
Wed Aug 24 10:55:06 2016
Managed Standby Recovery not using Real Time Apply
Parallel Media Recovery started with 48 slaves
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Log /oraback/archive/1_128823_811895258.dbf
Media Recovery Log /oraback/archive/2_123612_811895258.dbf
Wed Aug 24 10:55:08 2016

问题到此搞定。






欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2