Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2014
    Location
    India
    Posts
    18

    Unanswered: DB2 HADR V10.1 - Checks for standby on disaster

    DB2 version: V10.1 ESE
    GNU/Linux

    For a HADR pair setup in SUPERASYNC mode, when disaster occurs and primary goes down, how to check whether standby received all logs from primary or was lagging behind?
    Before disaster primary may have been connected to many clients & executing number of transactions.

    Intention is to :
    1. Check whether stand-by is up to date or not
    2. For failback, that is to make old primary as the new primary again, how to make sure that that there is no mismatch?

    Hope my questions are clear, else please let me know.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Try db2pd -hadr
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Apr 2012
    Posts
    156
    db2pd -db <dbname> -hadr will give you the status
    If you are doing a HADR failover test and both nodes are up you can do a graceful takeover:
    d2bw takeover hadr on db <dbname> <-- Note this is run on the failover node, it will communicate back to the primary. I have not used this on a superasynch standby db, so I am not 100% there are not any differences in takeover procedures.

    One thing to keep in mind is you are running superasynch, which by its nature does allow for the possibility of some data loss. What I do on my HADR systems is in a failover situation we automatically try to do a graceful takeover, if that fails manual intervention is required. This is a bit slower but avoids issues like Split Brain Scenario, Data Loss etc. These issues are rare, but in the event of a Split Brain Scenario fixing the issue could take a very long tme.

  4. #4
    Join Date
    Feb 2014
    Location
    India
    Posts
    18
    Thanks for the replies.
    I wanted to know what parameters in the output obtained from db2pd -hadr needs to be checked for getting to know that the standby is missing updates.

    For the scenario where primary has crashed suddenly, and takeover is done by force on standby, old primary will not know that the standby is now the new primary.

  5. #5
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    If you takeovered the database by force the only way to understand if you have lost transactions or not is to try to reintegrate these databases.
    You should run on the old primary the following:
    Code:
    db2 start hadr on db mydb as standby
    If you get "success" you're lucky.
    Regards,
    Mark.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •