转载 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

【HADR】How to reestablish HADR from scratch after a failure on Standby的更多相关文章

  1. 【AWS】【TroubleShooting】EC2实例无法使用SSH远程登陆(EC2 failure for SSH connection)

    1. Login AWS web console and check the EC2 instance.

  2. 【HADR】常见的问题

    [hadrpri@oc0644314035 ~]$ db2 start hadr on db org as primary SQL1768N  Unable to start HADR. Reason ...

  3. 【APUE】Chapter10 Signals

    Signal主要分两大部分: A. 什么是Signal,有哪些Signal,都是干什么使的. B. 列举了非常多不正确(不可靠)的处理Signal的方式,以及怎么样设计来避免这些错误出现. 10.2 ...

  4. Python高手之路【六】python基础之字符串格式化

    Python的字符串格式化有两种方式: 百分号方式.format方式 百分号的方式相对来说比较老,而format方式则是比较先进的方式,企图替换古老的方式,目前两者并存.[PEP-3101] This ...

  5. 【原】谈谈对Objective-C中代理模式的误解

    [原]谈谈对Objective-C中代理模式的误解 本文转载请注明出处 —— polobymulberry-博客园 1. 前言 这篇文章主要是对代理模式和委托模式进行了对比,个人认为Objective ...

  6. 【原】FMDB源码阅读(三)

    [原]FMDB源码阅读(三) 本文转载请注明出处 —— polobymulberry-博客园 1. 前言 FMDB比较优秀的地方就在于对多线程的处理.所以这一篇主要是研究FMDB的多线程处理的实现.而 ...

  7. 【原】Android热更新开源项目Tinker源码解析系列之一:Dex热更新

    [原]Android热更新开源项目Tinker源码解析系列之一:Dex热更新 Tinker是微信的第一个开源项目,主要用于安卓应用bug的热修复和功能的迭代. Tinker github地址:http ...

  8. 【调侃】IOC前世今生

    前些天,参与了公司内部小组的一次技术交流,主要是针对<IOC与AOP>,本着学而时习之的态度及积极分享的精神,我就结合一个小故事来初浅地剖析一下我眼中的“IOC前世今生”,以方便初学者能更 ...

  9. Python高手之路【三】python基础之函数

    基本数据类型补充: set 是一个无序且不重复的元素集合 class set(object): """ set() -> new empty set object ...

随机推荐

  1. Hadoop学习【一】单机版搭建

    首先要说一下,Hadoop 2.x版本以后的改动,在这里帖一篇文章,觉得写的不错. http://www.ibm.com/developerworks/cn/opensource/os-cn-hado ...

  2. HBase & thrift & C++编程

    目录 目录 1 1. 前言 1 2. 启动和停止thrift2 1 2.1. 启动thrift2 1 2.2. 停止thrift2 1 2.3. 启动参数 2 3. hbase.thrift 2 3. ...

  3. 企业搜索引擎开发之连接器connector(十九)

    连接器是基于http协议通过推模式(push)向数据接收服务端推送数据,即xmlfeed格式数据(xml格式),其发送数据接口命名为Pusher Pusher接口定义了与发送数据相关的方法 publi ...

  4. Centos 7 安装 mysql5.7

    1.需要下载mysql 下载地址:http://dev.mysql.com/downloads/mysql/ 2.将下载的rpm包上传到centos 7上(我是放在根下面的opt目录) 3. 安装my ...

  5. [编译,报错以及其他] 有关C/C++中int不能用-2147483648当最小值的问题

    这个取决于今早看耗子叔的微博: 这里说到了int的取值范围的问题,int的取值是-2147483648 ~ 2147483647,但是如果直接在编译器(VS2013)中使用-2147483648会报错 ...

  6. wp8.1 SQLite的基本使用

    SQLite是一个轻量级的关系型数据库,正是由于其精悍小巧,在移动端平台被广泛应用,但不适合处理大量数据和批量操作.它的底层是由C语言编写,最初设计是为了应用于嵌入式,占用资源非常低且简单易用,而且绝 ...

  7. centos6.6 下安装mysql5.7

    背景 没啥好说的,就是需要搭建自己的测试数据库跟研发的数据隔离开来,需要怼mysql 这个方法只适合mysql5.7 # mysql5.6的有差异 步骤 1. 确认线上mysql的版本 SELECT ...

  8. async异步方法

    在C# 中,可以使用asyc+await来完成一个异步方法. async用来标志一个使用了await的方法是非阻塞API,是一个异步方法,就当成一个普通关键字就行了.关键是await,await是配合 ...

  9. Jquery 记一次使用fullcalendar的使用记录

    最近接了一个需求,把excel做的表格开发到系统里,本来想直接做成表格的形式,后来考虑到数据库中的表结构不好设计,最后决定做成日历的形式: 先上成品图 需要引用的js,fullcalendar官网可以 ...

  10. cesium随笔 — 简单实现获取三维范围(包括相机高度)

    代码 // 获取当前三维范围 function getCurrentExtent() { // 范围对象 var extent = {}; // 得到当前三维场景 var scene = viewer ...