I had that some time ago after applying Patch 27475598 – Oracle JavaVM Component 184.108.40.206.180417 Database PSU.
Why? Well, this is Non RAC-Rolling Installable and also Not Data Guard Standby First Installable.
This means there downtime for this patch, no escape.
I had to (skipping all the standard opatch steps, you can see those on README):
- Stop DG Replication:
dgmgrl / show configuration show database mydg edit database 'mydg' set state='apply-off'; show database mydg
- Run postinstall.sql in upgrade mode with only 1 instance on (disable RAC):
cd $ORACLE_HOME/sqlpatch/27475598 sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> STARTUP SQL> alter system set cluster_database=false scope=spfile; SQL> SHUTDOWN SQL> STARTUP UPGRADE SQL> @postinstall.sql SQL> alter system set cluster_database=true scope=spfile; SQL> SHUTDOWN SQL> STARTUP
Ok, all good, seems all fine.
But now when starting my DG replication:
dgmgrl / show configuration show database mydg edit database 'mydg' set state='apply-on'; show database mydg
What I see is:
DGMGRL> show database mydg Database - mydg Role: PHYSICAL STANDBY Intended State: APPLY-ON Transport Lag: 0 seconds (computed 1 second ago) Apply Lag: 41 minutes 53 seconds (computed 1 second ago) Apply Rate: (unknown) Real Time Query: OFF Instance(s): myprod Database Error(s): ORA-16766: Redo Apply is stopped Database Status: ERROR DGMGRL>
And on Database Alert Log:
MRP0: Background Media Recovery terminated with error 10485 Errors in file /u01/app/oracle/diag/rdbms/axwest/greporaprod/trace/greporaprod_pr00_42628.trc: ORA-10485: Real-Time Query cannot be enabled while applying migration redo. Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION Recovery interrupted! MRP0: Background Media Recovery process shutdown (greporaprod)
Well, in my case it happens because I use an Active Dataguard, in open read only. The solution? Start you DG in Mount Mode to apply the patching replication!
This is well described as per MOS: MRP process getting terminated with error ORA-10485 (Doc ID 1618485.1).
After getting sync, you can simple promote it to read only mode again.
Hope it helps!