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 thoughts on “ORA-16139: media recovery required

  1. 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

  2. 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

  3. 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

  4. 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

Leave a Reply to Fadzli Syed Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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