Site icon IT Tutorial

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/

Exit mobile version