MRP: Background Media Recovery process shutdown on Physical standby Dataguard
MRP:
Background Media Recovery process shutdown on Physical standby Dataguard
Applies
to:
Oracle Database 10gR2
Description:
RFS process successfully running,
archive logs successfully shipped from Primary server to standby, but archive
logs did not apply. MRP process going to shutdown automatically. After doing some research work I found the following solution:
Solution:
SQL> alter database recover
managed standby database cancel;
SQL> alter database recover
managed standby database cancel;
alter database recover managed
standby database cancel
*
ERROR at line 1:
ORA-16136: Managed Standby Recovery
not active
SQL> alter database recover
managed standby database disconnect from session;
Alert log:
alter database recover managed
standby database disconnect from session
Sat Jun 9 09:51:56 2012
Attempt to start background Managed
Standby Recovery process (PROD)
MRP0 started with pid=18, OS id=6591
Sat Jun 9 09:51:56 2012
MRP0: Background Managed Standby
Recovery process started (PROD)
Managed Standby Recovery not using
Real Time Apply
MRP0: Background Media Recovery
terminated with error 1111
Sat Jun 9 09:52:01 2012
Errors in file
/d01/oracle/proddb/10.2.0/admin/PROD_pebsdbdrrt/bdump/prod_mrp0_6591.trc:
ORA-01111: name for data file 59 is
unknown - rename to correct file
ORA-01110: data file 59:
'/d01/oracle/proddb/10.2.0/dbs/UNNAMED00059'
ORA-01157: cannot identify/lock data
file 59 - see DBWR trace file
ORA-01111: name for data file 59 is
unknown - rename to correct file
ORA-01110: data file 59:
'/d01/oracle/proddb/10.2.0/dbs/UNNAMED00059'
Sat Jun 9 09:52:01 2012
Errors in file
/d01/oracle/proddb/10.2.0/admin/PROD_pebsdbdrrt/bdump/prod_mrp0_6591.trc:
ORA-01111: name for data file 59 is
unknown - rename to correct file
ORA-01110: data file 59:
'/d01/oracle/proddb/10.2.0/dbs/UNNAMED00059'
ORA-01157: cannot identify/lock data
file 59 - see DBWR trace file
ORA-01111: name for data file 59 is
unknown - rename to correct file
ORA-01110: data file 59:
'/d01/oracle/proddb/10.2.0/dbs/UNNAMED00059'
Sat Jun 9 09:52:01 2012
MRP0: Background Media Recovery
process shutdown (PROD)
Sat Jun 9 09:52:02 2012
Completed: alter database recover
managed standby database disconnect from session
SQL> select
thread#,max(sequence#) from v$log_history group by thread#;
THREAD# MAX(SEQUENCE#)
---------- --------------
248980
SQL> select severity,
error_code,message,to_char(timestamp,'DD-MON-YYYY HH24:MI:SS') from
v$dataguard_status;
SQL> archive log list
SQL> ho ls -ltra /archive/logs/
SQL> select
process,status,sequence# from v$managed_standby;
PROCESS STATUS
SEQUENCE#
--------- ------------ ----------
ARCH CONNECTED 0
ARCH CONNECTED 0
RFS IDLE 0
RFS IDLE 0
SQL> ho ps -ef|grep mrp
oracle 30350 30330
0 09:24 pts/2 00:00:00
/bin/bash -c ps -ef|grep mrp
oracle 30352 30350
0 09:24 pts/2 00:00:00 grep mrp
SQL> select file#,name from
v$datafile where name like '%UNNAMED%';
FILE#
----------
NAME
--------------------------------------------------------------------------------
59
/d01/oracle/proddb/10.2.0/dbs/UNNAMED00059
SQL> alter database create
datafile '/d01/oracle/proddb/10.2.0/dbs/UNNAMED00059' AS
'/data3/proddata/daw_INV_06.dbf';
SQL> alter database recover
managed standby database cancel;
alter database recover managed
standby database cancel
*
ERROR at line 1:
ORA-16136: Managed Standby Recovery
not active
SQL> alter database recover
managed standby database disconnect from session;
Database altered.
SQL> select
thread#,max(sequence#) from v$log_history group by thread#;
THREAD# MAX(SEQUENCE#)
---------- --------------
1 248980
SQL> /
THREAD# MAX(SEQUENCE#)
---------- --------------
1 248981
Problem has been resolved, now MRP
process started and recovering the archive logs.
Your comments, especially which will help us improve the functionality, will be greatly appreciated :)
Your comments, especially which will help us improve the functionality, will be greatly appreciated :)
Really helpful!!
ReplyDeletefrom where you got the name 'data3/proddata/daw_INV_06.dbf' to recreate the datafile 59
ReplyDeleteHi,
ReplyDeleteActual name of data file# 59 is 'data3/proddata/daw_INV_06.dbf' as on primary server you can check.
After corruption it create the temporary datafile as '/d01/oracle/proddb/10.2.0/dbs/UNNAMED00059'
Thanks
Rana
This really helped. I have real-time apply set and I didn't have to bring the datagaurd instance down to fix it. I just wanted to add how I found out which datafile it was. I'm sure others already know but if not this is what I did: PRIMARY DB
ReplyDeleteSQL>select file#,name from v$datafile where file#=xxx; (number you get from the unnamed sql) this will help when you do the alter database create datafile.