ORA-16139: media recovery required

Hi,

Sometimes you can get  “ORA-16139: media recovery required  ” error.

 

Details of error are as follows.

ORA-16139: media recovery required

Cause: An error has occurred while performing a switchover.
Action: If you were switching a primary database to the standby role, the conversion was successful,
but one or more errors occurred after the conversion completed. See the alert log for more information.
You can proceed with switching the target standby database to the primary role, but you must address the errors
reported at the old primary database before it can protect the new primary database. If you encountered this error
while switching a physical standby database to the primary role, the switchover did not succeed because additional
redo must be applied. Verify that redo apply is active and wait until the SWITCHOVER_STATUS column of the V$DATABASE
dynamic performance view reports TO_PRIMARY or SESSIONS_ACTIVE before retrying the switchover.
SQL> alter database commit to switchover to primary with session shutdown;
alter database commit to switchover to primary with session shutdown
*
ERROR at line 1:
ORA-16139: media recovery required

 

To solve this error, you need to complete the media recovery with the following command.

SQL> RECOVER MANAGED STANDBY DATABASE FINISH;

Media recovery complete.

 

 

 

Or try it with finish force option as follows.

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH FORCE;

Database altered

 

Now try again.

SQL> alter database commit to switchover to primary with session shutdown;
Database altered

 

 

Problem has been solved.

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Leave a Reply

Your email address will not be published. Required fields are marked *