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

  • 相关阅读:
    eclipse springboot运行helloworld错误: 找不到或无法加载主类 xxx.xxx.xxx
    springboot整合quartz并持久化到数据库
    pssh批量管理服务器
    网络拓扑图练习
    网络设备之ospf2
    网络设备之基础配置命令(华为交换机二三层)
    华为交换机配置静态路由
    docker参考文档
    docker系列之镜像服务器
    docker系列之分区挂载和数据卷
  • 原文地址:https://www.cnblogs.com/DBA-Ivan/p/4234610.html
Copyright © 2011-2022 走看看