ORA-16139: media recovery required

During switch physical standby database to primary database i received following error message on (physical standby database)

ٍٍSQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY

*ERROR at line 1:ORA-16139: media recovery required

THE SOLUTION :

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

SWITCHOVER_STATUS

——————–

SWITCHOVER LATENT

SQL> RECOVER MANAGED STANDBY DATABASE FINISH;

Media recovery complete.

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

 Metalink Note:[ID 219554.1]

Thank You
osama

13 responses to “ORA-16139: media recovery required”

  1. Thank you! Spent ages googling for this and it's a single command: RECOVER MANAGED STANDBY DATABASE FINISH!

    Like

  2. Hello OsamaSorry, but this screwed me up. I wanted a switchover and faced ORA-16139 on my 11.2.0.3. I used “RECOVER MANAGED STANDBY DATABASE FINISH” as you mentioned without specifying that this is used only for FAILOVER only and after you issue switchover sommand, your primary DOES NOT become primary and you find yourself in a AILOVER situation. http://docs.oracle.com/cd/B19306_01/server.102/b14239/sql_stmts.htmThe FINISH clause initiates failover on the target physical standby database and recovers the current standby redo log files. Use the FINISH clause only in the event of the failure of the primary database. This clause overrides any delay intervals spec

    Like

  3. Hello osama…I have also got same error. but unable to switch that to primary… alter database RECOVER MANAGED STANDBY DATABASE FINISH;alter database RECOVER MANAGED STANDBY DATABASE FINISH*ERROR at line 1:ORA-00283: recovery session canceled due to errorsORA-01110: data file 1: '/u01/app/server12c/oradata/testdb1/system.dbf'ORA-01157: cannot identify/lock data file 1 – see DBWR trace fileORA-01110: data file 1: '/u01/app/server12c/oradata/testdb1/system.dbf'this is the error after giving command… please help …. !

    Like

  4. Anonymous

    alter database RECOVER MANAGED STANDBY DATABASE FINISH; Worked for me on time, Thanks a lot Osama Mustafa

    Like

  5. Your more than welcome 🙂

    Like

  6. This is wonderful; Dan I just used this and it fixed my issue. such a simple and practical solution to an apparently sophisticated problem.

    Like

  7. This comment has been removed by the author.

    Like

  8. 1. It works “RECOVER MANAGED STANDBY DATABASE FINISH;” for my case although the return message is difference but same error message…2. SELECT SWITCHOVER_STATUS FROM V$DATABASE; return message “Pending performing switchover standby” something like this the error. didnt screen shot my bad…Thanks for sharing…

    Like

  9. Agree with Salman.. instead of switchover, failover happens.

    Like

  10. wao just like quickest fix for a while thankd

    Like

  11. ORA-00283: recovery session canceled due to errorsORA-00331: log version 11.2.0.4.0 incompatible with ORACLE version 11.2.0.0.0

    Like

  12. This webpage saved my butt this morning, THANK YOU SO MUCH!TIM

    Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.