4 Replies Latest reply: Nov 28, 2012 3:22 AM by 914264 RSS

    Is this statement for creation of active standby pair correct?

    914264
      Hi,I have two servers, one is "baal" and the other is "diablo".
      I want to create a active standby pair with RETURN TWOSAFE and disable RETURN after 5 times timeout happens and resume RETURN if less than 8 ms acknowledge.
      I do not make sure whether 8 ms is reasonable if standby node is far behind the active node(supposing the standby node is of hardware failure).
      Here is my statement:
      --------------------------------
      CREATE ACTIVE STANDBY PAIR eppdb ON "baal", eppdb ON "diablo"
      RETURN TWOSAFE
      STORE eppdb ON "baal"
      DISABLE RETURN ALL 5
      RESUME RETURN 8;
      -------------------------------
      What I 'm not clear is about the keyword “STORE”,
      I have seen there are many "STORE" after RETURN TWOSAFE and that make me confused for a while.
      if this statement is wrong please correct me.

      Thanks.
        • 1. Re: Is this statement for creation of active standby pair correct?
          Chrisjenkins-Oracle
          You would want something like this:

          CREATE ACTIVE STANDBY PAIR
          eppdb ON "baal", eppdb ON "diablo" RETURN TWOSAFE
          STORE eppdb ON "baal"
          DISABLE RETURN ALL 5 RESUME RETURN 8
          STORE eppdb ON "diable"
          DISABLE RETURN ALL 5 RESUME RETURN 8
          ;

          to ensure that the parameters are applied symmetrically. 8 ms is a quite low value. If it is 'okay' depends on your hardware and your workload. You might want to use a higher value like 20 ms maybe but 'it all depends'.

          If you will be using RETURN services of any kind I would strongly recommend you to consider also configuring the following options:

          RETURN SERVICES OFF WHEN STOPPED
          DURABLE COMMIT ON
          LOCAL COMMIT ACTION COMMIT
          RETURN WAIT TIME Seconds

          Chris
          • 2. Re: Is this statement for creation of active standby pair correct?
            914264
            Chris, as you suggestion, the statement will become as the following:
            -------------------------------------------------------------------------------------------------
            CREATE ACTIVE STANDBY PAIR eppdb ON "baal", eppdb ON "diablo"
            RETURN TWOSAFE
            STORE eppdb ON "baal" DISABLE RETURN ALL 5 RESUME RETURN 20
            STORE eppdb ON "diablo" DISABLE RETURN ALL 5 RESUME RETURN 20
            RETURN SERVICES OFF WHEN STOPPED
            DURABLE COMMIT ON
            LOCAL COMMIT ACTION COMMIT
            RETURN WAIT TIME 30;
            --------------------------------------------------------------------------------------------------
            could you explain what's the mean or why for the composite options?

            Will it provide more confidence about the data consistence?
            • 3. Re: Is this statement for creation of active standby pair correct?
              Chrisjenkins-Oracle
              Actually, all these options apply at the store level so the statement would look like this:

              CREATE ACTIVE STANDBY PAIR
              eppdb ON "baal", eppdb ON "diablo" RETURN TWOSAFE
              STORE eppdb ON "baal"
              DISABLE RETURN ALL 5 RESUME RETURN 20
              RETURN SERVICES OFF WHEN STOPPED
              DURABLE COMMIT ON
              LOCAL COMMIT ACTION COMMIT
              RETURN WAIT TIME 30
              STORE eppdb ON "diablo"
              DISABLE RETURN ALL 5 RESUME RETURN 20
              RETURN SERVICES OFF WHEN STOPPED
              DURABLE COMMIT ON
              LOCAL COMMIT ACTION COMMIT
              RETURN WAIT TIME 30;

              All these options, and their meaning are described in detail in the (very good) documentation. I would recommend you read it to fully understand what you are configuring here... Just in summary.

              Whenever the standby is unavailable, application commits will experience timeouts (TT warning 8170). Application code must be prepared to receive and react to this warning. Eventually (based on the DISABLE RETURN and RETURN WAIT options [see below]) TT will fall back to async mode and the timeouts will stop. Once the standby is available and the stores are back in sync TT will switch back to RETURN TWOSAFE mode again.

              DISABLE RETURN ALL 5 - turn off return twosafe processing (i.e. fallback to async mode) after 5 consecutive timeouts (each timeout will be 30 seconds)

              RETURN WAIT TIME 30 - wait up to 30 seconds (a very long time) for a return service acknowledgement from the peer

              The combination of these two parameters means that in the event of a network outage or the standby going offline the active will wait around 150 seconds (5 x 3) before deactivating return twosafe processing. During this time application transactions will hand and experience timeouts. I would suggest smaller values such as 2 and 10 maybe but only t=ou can decide what is reasonable for your environment.

              DURABLE COMMIT ON - whenever return services are deactivated, force all commits to be durable (synchronous to disk). This will degrade performance but ensures continued data protection when the standby is not available. If you don't want this feature then do not configure it (but then when the standby is unavailable you are exposed to data loss if the active fails).

              RETURN SERVICES OFF WHEN STOPPED - deactivate return services (switch to async mode) whenever the replication agent is stopped.

              LOCAL COMMIT ACTION COMMIT - if a commit gets a timeout warning (TT8170) then the state of the transaction is uncertain. The application can choose to commit locally (allowing it to continue processing), in which case the comitted txn. will be added to the replication queue for (possible) retransmission in async mode. This is the recommended behaviour and is set by this option. The other option is NO ACTION which is also the default. With this option the application has to implement logic to make its own decision and then call some TT specific builtin functions to decide how to handle the uncertain state. This adds significant complexity. Until the application makes a decision it is unable to proceed.

              See documentation for more information.
              • 4. Re: Is this statement for creation of active standby pair correct?
                914264
                Perfect answer and it's more readable than those documents:)