Saturday, 3 February 2018

ORA-10456: cannot open standby database; media recovery session may be in progress


Once while starting my standby database i found that database is not opening in normal mode. It throws the error-10456 :cannot standby database. 


On performing some R&D and googling comes to the conclusion that this error is generally occurs because a media recovery or RMAN session may have been in progress on a mounted instance of a standby database when an attempt was made to open the standby database. Hence to solve of this issue we have to cancel any conflicting recovery session and then open the standby database.

Here is the issue what i have experienced .

C:\>sqlplus sys/xxxx@red as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Oct 3 12:47:32 2011
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name,open_mode,database_role from v$database;

NAME OPEN_MODE DATABASE_ROLE

--------- --------------------

NOIDA MOUNTED PHYSICAL STANDBY


SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-10456: cannot open standby database; media recovery session may be in progress

SQL> alter database recover managed standby database cancel;
Database altered.

SQL> alter database open;
Database altered.

SQL> alter database recover managed standby database using current logfile disconnect ; 
Database altered.



SQL> select name,open_mode,database_role from v$database;

NAME  OPEN_MODE              DATABASE_ROLE

------ -------------------  ----------------

NOIDA READ ONLY WITH APPLY   PHYSICAL STANDBY


Hence, finally we solve the issues.


Enjoy    :-)

No comments:

Post a Comment