4 Replies Latest reply: Feb 20, 2013 12:11 PM by CKPT RSS

    Query regarding standby database state when primary is down or un-reachable

    992195
      Hi

      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.

      Thanks,
      Yojana
        • 1. Re: Query regarding standby database state when primary is down or un-reachable
          mseberg
          Hello;

          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.

          Best Regards

          mseberg
          • 2. Re: Query regarding standby database state when primary is down or un-reachable
            Victor Armbrust
            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
            More information:
            https://forums.oracle.com/forums/thread.jspa?messageID=10737274&#10737274


            Victor
            • 3. Re: Query regarding standby database state when primary is down or un-reachable
              mseberg
              Victor;

              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 :
              Oracle Database 11g Enterprise Edition Release 11.2.0.3.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
              So this does not seem a good test for starting a failover.


              My main concern with a failover is not performing one if I don't have to. Use a switchover if you can.

              Best Regards

              mseberg
              • 4. Re: Query regarding standby database state when primary is down or un-reachable
                CKPT
                989192 wrote:
                Hi

                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.

                Thanks,
                Yojana
                You don't have exactly such option,
                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.

                HTH.