Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2007
    Posts
    66

    Unanswered: Script to bounce HADR servers

    Can anyone give me hints to write a script to bounce HADR servers i.e both the primary and standby..We need to stop hadr on standby,stophadr on primary,stop db2 on both ,start db2 on both and finally bring HADR up between them sync.


    I was having trouble in communicating the HADR status between the two servers.


    Thanks in advance

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    The standby server must be in rollforward pending state at all times, so you cannot stop HADR on the standby unless you want to rebuild it from a restore of a backup of the primary when you bring the standby instance back up.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    If you are certain the databases are in synch after a restart, you might try this command to get the standby in roll forward pending state. See the Command Reference manual:

    db2rfpen - Reset rollforward pending state

    However, if you can restart the standby while HADR is still running, then that would be best since it will catch up even if it is behind when restarted. I think it "may be" OK to stop HADR on the primary (but not the standby) when restarting the instances. "May be" means that I have not tested this and there are no guarantees, since this is based on my recollection of having worked with HADR last year.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Jun 2007
    Posts
    66
    Hi Marcus,

    We can stop HADR on standby and we have been doing that.We have been doing the following steps manually to bounce a HADR DB

    1)Stop HADR on standby and then on primary

    2)Stop DB2

    3)Start DB2

    4)Start HADR on standby and then on primary


    I want to automate the above steps.Any tips would be appreciated

    Thanks
    Srini

Posting Permissions

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