Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Dec 2010
    Posts
    123

    Unanswered: how to disable HADR in db2

    Hi all,
    we had HADR setup on windows, due to some reasons i want to down the standby server , at the same time i want to run primary server.
    can anybody provide me procedure to achieve this
    Any help can be appreciable..

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    deactivate the database on the standby server
    stop hadr on the standby server
    stop hadr on the primary server

    See the manual for exact command syntax.
    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
    Dec 2010
    Posts
    123
    Quote Originally Posted by Marcus_A View Post
    deactivate the database on the standby server
    stop hadr on the standby server
    stop hadr on the primary server

    See the manual for exact command syntax.
    Thanku so much Marcus, i tried above commands only, now everything is fine,

  4. #4
    Join Date
    Dec 2010
    Posts
    123
    As i am new to HARD,
    i have following doubts regarding this

    1q) After few days i have to enable HADR again, for this one simply restarting HADR on both the servers is enough or
    2q)i have to take backup on primary and restore on standby server
    3q)if i have to take backup , it must be online or offline??

  5. #5
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    if the logfiles are still available on primary (archived to disk-tape-tsm) and can be retrieved - you can start hadr on stdby - will do remote catchup and sync
    if not
    take online backup on primary and restore on stndby - NO ROLLFORWARD todo
    db will sync...
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    In theory, you should be able to start HADR without the need for restore[ assuming - you have not rolled forward the standby ] . But this will mean the standby has to catchup with the primary - with the primary doing the work of retrieving the log files and sending across the network. Depending on how much the primary has changed, this process will take a while.

    So, if the database is small, it is easier to do a backup and restore. The backup can be either online or offline.

    Alternatively, you can use do "manual" catchup. Just copy the archive logs generated on the primary and issue a ROLLFORWARD command on the standby . Make sure you do not COMPLETE the rollforward. Once the databases are reasonably in sync, then start HADR. The catchup will be quicker.

    Cheers
    Sathy
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  7. #7
    Join Date
    Nov 2011
    Posts
    87

    nerver use STOP HADR

    hi,
    you might find the answer by this time.
    However,
    Once you use the STOP HADR command on the standby , the db becomes online. which means you can not restart HADR without restoring it.

    Never use the STOP HADR command unless you are ready to restore the DB.

    mtrk.

  8. #8
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    As far as I rememer, STOP HADR puts the db on standby in rollforward pending state. It requires a rollforward command to bring it online.

    As long as the db is in rollforward pending state, it retains all its internal identifiers and therefore can get in sync with the primary if HADR is started.


    Cheers
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  9. #9
    Join Date
    Nov 2011
    Posts
    87
    Quote Originally Posted by sathyaram_s View Post
    As far as I rememer, STOP HADR puts the db on standby in rollforward pending state. It requires a rollforward command to bring it online.

    As long as the db is in rollforward pending state, it retains all its internal identifiers and therefore can get in sync with the primary if HADR is started.


    Cheers
    Sathyaram

    Yes, you are right, the SB will be in rollforward pending state (sorry not online). but you can not start the HADR. I have tried this many times. Finally I had to restore it.

    Regards, mtrk

  10. #10
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Guy seems to concur with my (above) opinion this thread.

    If I remember correctly, I have done the "manual" catch-up I referred in my earlier post when the standby server had crashed and was lagging behind the primary by dozens of logs when it became available.

    I could be wrong though. I do not have access to a HADR pair to test.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  11. #11
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    you can stop hadr as much as you need and sometimes it gets stopped (by bug or network problem) as long as the log files are available somewhere - restore is not needed or should not be..
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  12. #12
    Join Date
    Dec 2010
    Posts
    123
    Thanku so much guys for your response, sorry for the late reply...

    satyaram_s::Alternatively, you can use do "manual" catchup. Just copy the archive logs generated on the primary and issue a ROLLFORWARD command on the standby . Make sure you do not COMPLETE the rollforward??

    Pls can you explain me in detail , which rollforward command i have to prefer for this activity.

  13. #13
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    there is just 1 command : rollforward
    see for details : ROLLFORWARD DATABASE
    DO NOT specify AND COMPLETE
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  14. #14
    Join Date
    Dec 2010
    Posts
    123
    Thanku so much Przytula for your reply,
    Can anybody explain difference between HADR_SYNCMODE=SYNC and
    HADR_SYNCMODE=NEARSYNC, i already refered to some basic definition of both from IBM site , but i am not getting clear idea.

    For my situation (i.e , to stop DR server and after few days again i have to enable HADR)
    which one is more suitable(whether HADR_SYNCMODE=SYNC or
    HADR_SYNCMODE=NEARSYNC)

  15. #15
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

Posting Permissions

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