zoukankan      html  css  js  c++  java
  • 【HADR】How to reestablish HADR from scratch after a failure on Standby

    转载 http://www-01.ibm.com/support/docview.wss?uid=swg21514783

    Cause 
    Have a HADR pair with Primary online but a failure on the Standby makes it necessary to reestablish the HADR pair again
      Answer 
    This note intends to serve as a quick guide to reestablish HADR, please follow the Information Center link below (Initializing high availability disaster recovery HADR) for full documentation.
     
    1. ON THE PRIMARY MACHINE:
     
    - Break HADR
    db2 "STOP HADR ON DB <database>"
     
    Please note that this step is not always needed. If there has been a failure on the Standby and the Standby is inactive, the expected situation is that the HADR would be on a "disconnected" state.
    This command ensures that the Primary database is on Standard mode and that we do not have any HADR processes running.
    Please review the "STOP HADR command" link below for reference and check its behaviour depending on the state of the server.
     
    - Take a new backup image
    db2 "backup database <database> ONLINE to <path>"
     
    Please note that on the backup and restore commands detailed here and on step 2. we are putting the simplest command. Backup/ Restore can be done using TSM, path could be a NFS exported drive so that ftp is not needed on step 2. Split mirror is also a valid approach for backup.
     
    2. ON THE STANDBY MACHINE:
     
    - FTP the backup image (from the primary machine) to the STANDBY MACHINE
     
    - db2 "restore database <database> from <path>"
     
    - Set up HADR cfg parameters on standby database
     
    db2 update db cfg for <database> using HADR_LOCAL_HOST <local host>
    db2 update db cfg for <database> using HADR_LOCAL_SVC <local port>
    db2 update db cfg for <database> using HADR_REMOTE_HOST <remote host>
    db2 update db cfg for <database> using HADR_REMOTE_SVC <remote port>
    db2 update db cfg for <database> using HADR_REMOTE_INST <remote instance>
     
    - Start up HADR on standby server
    db2 start hadr on database <database> as standby
     
    3. ON THE PRIMARY MACHINE:
     
    - Start up HADR on the primary server
    db2 start hadr on database <database> as primary
     
    - Verify HADR is up and running
    db2pd -db <database> -hadr

  • 相关阅读:
    POJ-1465 Multiple
    POJ-2585 Window Pains
    POJ-1094 Sorting It All Out
    Linux基础学习笔记1
    建议3---理解Python与C语言的不同之处
    堆排序的Python实现
    迭代器和生成器详解
    建议2---编写pythonic代码
    python中Switch/Case实现
    建议1---理解Pythonic的概念
  • 原文地址:https://www.cnblogs.com/DBA-Ivan/p/4234610.html
Copyright © 2011-2022 走看看