Comentários (3)

1 localhost comentou às Link permanente

Step by Step DB2 UDB HADR Setup on Linux

 
For example, on my machine called gplinux, I have two instances (db2inst1, db2inst2), db2inst1 is the primary and db2inst2 is the standby, there is a sample db created on db2inst1,
 
on /etc/services, I can see this: DB2_db2inst1 60000/tcpDB2_db2inst1_1 60001/tcpDB2_db2inst1_2 60002/tcpDB2_db2inst1_END 60003/tcp
 
DB2_db2inst2 60004/tcpDB2_db2inst2_1 60005/tcpDB2_db2inst2_2 60006/tcpDB2_db2inst2_END 60007/tcp
 
ON THE PRIMARY db2 instance ie db2inst1:======================================== 1) db2 "update db cfg for sample using LOGRETAIN recovery" 2) db2 "backup db sample to /dev/null" 3) db2 connect to sample 4) db2 "update db cfg for sample using HADR_LOCAL_HOST gplinux" 5) db2 "update db cfg for sample using HADR_LOCAL_SVC DB2_db2inst1_2" 6) db2 "update db cfg for sample using HADR_REMOTE_HOST gplinux" 7) db2 "update db cfg for sample using HADR_REMOTE_SVC DB2_db2inst2_2" 8) db2 "update db cfg for sample using HADR_REMOTE_INST db2inst2" 9) db2 "update db cfg for sample using LOGINDEXBUILD on" 10) Take Backup - db2 "backup db sample"
 
11) ftp the backup image to the standby machine ,( I am not doing this step because my standby and primary are on the same box ) ON THE STANDBY db2 instance ie db2inst2: ======================================== 12) db2start 13) db2 "restore db sample taken at " 14) db2 "update db cfg for sample using HADR_LOCAL_HOST gplinux" 15) db2 "update db cfg for sample using HADR_LOCAL_SVC DB2_db2inst2_2" 16) db2 "update db cfg for sample using HADR_REMOTE_HOST gplinux" 17) db2 "update db cfg for sample using HADR_REMOTE_SVC DB2_db2inst1_2" 18) db2 "update db cfg for sample using HADR_REMOTE_INST db2inst1" 19) db2 "update db cfg for sample using LOGINDEXBUILD ON 20) db2 "start hadr on db sample as standby" ON THE PRIMARY db2 instance (ie db2inst1): ========================================== 21) db2 "start hadr on db sample as primary"
 
ON STANDBY how to perform a takeover====================================22) db2 takeover hadr on db sample by forceDB20000I The TAKEOVER HADR ON DATABASE command completed successfully.
 
Howto Monitor high availability disaster recovery (HADR)========================================================You can use db2pd utility to monitor the status of your HADR databases.For example, to view information about high availability disaster recovery for database sample, issue the following:
 
23) db2pd -db sample -hadr
 

Incluir um Comentário Incluir um Comentário