Tuesday, October 18, 2016

Check if MRP process is running on DR instance.

Sometime we need to check if the MRP process is running in our DR database.

Solution:

This can be done using one simple SQL


SELECT PROCESS, DELAY_MINS
FROM V$MANAGED_STANDBY
WHERE PROCESS like 'MRP%';


If the above SQL returns nothing that means MRP is not running. How ever if it returns something that means MRP is running.

SQL> SELECT PROCESS, DELAY_MINS FROM V$MANAGED_STANDBY WHERE PROCESS like 'MRP%';
no rows selected
SQL>

-- MRP is not running 
-- To start MPR issue the SQL below

SQL>  ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
Database altered.
SQL>
SQL> SELECT PROCESS, DELAY_MINS FROM V$MANAGED_STANDBY WHERE PROCESS like 'MRP%';
PROCESS   DELAY_MINS
--------- ----------
MRP0               0
SQL>

-- MRP process is running now.

Tip: if you want standby logs to be applied instantly then issue

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;


2 comments:

Anonymous said...

Thank you very much. This helped me solve the issue.

Soulivong said...

very clear and helpful