For some reason, DG broker does not recognise the applying instance of a standby database.
DGMGRL> switchover to STDBYDB; Performing switchover NOW, please wait... Operation requires a connection to instance "STDBYDB2" on database "STDBYDB" Connecting to instance "STDBYDB2"... Connected as SYSDBA. Error: ORA-16644: apply instance not available Failed. Unable to switchover, primary database is still "PRIMDB" DGMGRL>
DIAGNOSIS
a) Check and find one of the instance STDBYDB1 is the recovery instance. Stop the standby recovery process, and then start it again. Data Guard still cannot find it.
b) Stop whole standby database, and restart it again. Check standby applying is undergoing. Data Guard still cannot find it.
RESOLUTION
DGMGRL> edit database STDBYDB set property 'PreferredApplyInstance' ='STDBYDB1'; Property "PreferredApplyInstance" updated $srvctl stop database -d STDBYDB; $srvctl start database -d STDBYDB; DGMGRL> edit database STDBYDB set property 'PreferredApplyInstance'=''; Property "PreferredApplyInstance" updated