Db2_10.01配置hadr

 
  1. On primary db2 update db cfg for Sample using hadr_local_host 10.6.26.10

db2 update db cfg for Sample using hadr_remote_host 10.3.1.150

db2 update db cfg for Sample using hadr_local_svc ‘51012/tcp’

db2 update db cfg for Sample using hadr_remote_svc ‘51013/tcp’

db2 update db cfg for Sample using hadr_remote_inst ‘db2inst1’ db2 update db cfg for Sample using hadr_timeout 120

db2 update db cfg for Sample using hadr_syncmode nearsync

db2 update db cfg for Sample using logarchmeth1 logretain

  1. backup Primary

db2 backup db sample

  1. scp to standby side , and restore sample.

db2 restore db sample from /data/backup/ taken at 20121204012431

  1. change db cfg on standby side.

db2 update db cfg for sample using HADR_LOCAL_HOST ‘10.3.1.150’

db2 update db cfg for sample using HADR_REMOTE_HOST ‘10.6.26.10’

db2 update db cfg for Sample using hadr_local_svc ‘51013/tcp’ db2 update db cfg for Sample using hadr_remote_svc ‘51012/tcp’

  1. start standby side

db2 start hadr on db sample as standby

6.start primary side. db2 activate db sample

db2 start hadr on db sample as primary