This content has been marked as final. Show 4 replies
I don't think there is one I would consider using. Having the standby think the primary is down or not reachable is different than having the user base think primary is down or not reachable.
I might step back and consider when the standby might execute a failover operation that you don't really want.
Network issue at Standby for example.
If you want a good failover operation it needs to be independent of either the Primary or the Standby server. The simple thing to do is to use observer. Trying to write your own is probably much harder and much less effective and safe.
You can check this using broker (dgmgrl), "show configuration" command... or "show database verbose '<db_name>';
You can also use v$database on standby to check the switchover_status of PRIMARY
select switchover_status from v$database
I don't believe that will work. If I run that query with the Primary down and then start the Primary I get the same results :
So this does not seem a good test for starting a failover.
Oracle Database 11g Enterprise Edition Release 126.96.36.199.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select switchover_status from v$database; SWITCHOVER_STATUS -------------------- NOT ALLOWED SQL> / SWITCHOVER_STATUS -------------------- NOT ALLOWED
My main concern with a failover is not performing one if I don't have to. Use a switchover if you can.
989192 wrote:You don't have exactly such option,
I want to know if there is any reflection on the standby database states when it's primary is down or not reachable? I want to use this information from standby node to determine if I can programatically execute (dgmgrl) failover operation or not? This is considering that the broker configuration has no fast-startfailover and no observer enabled/configured.
But you have alternate for it. Whenever standby is unreachable to primary then from standby alert log file you can see informational messages as RFS: Possible network disconnect with primary database , So you can write a script to grep those contents and to mail alert, so that you can sense whether any issue with primary database.