100 Tech Tips, #91 Setup HADR/DB2HAICU on Private-Public Network
John Gera 2700020XST Comment (1) Visits (4568)
There might be a need where you want to have log shipping for HADR on a private network and have your customers connect to the primary database on a public network via the Virtual IP address.
Initial steps for db2haicu can be found here.
The following steps explain how to setup hadr/db2haicu on a private network (for log shipping) and public network(for the application):
1. Setup HADR pair using the IP-Address of the Private Network for the HADR_LOCAL_HOST and HADR_REMOTE_HOST
2. Ensure that the databases are in peer state by running 'db2pd -db <DBNAME> -HADR'
3. Run 'preprpnode <hostname1> <hostname2>' on each server (as root) using the shortname for the host as shown in the second column of your /etc/host file for each node
4. Issue 'hostname' command and use this output for all hostname inputs throughout the db2haicu process (but not for the HADR_LOCAL and REMOTE host)
5. Run the "db2haicu" tool on the standby server first
6. Define the public and the private networks of your system to db2haicu
7. Once db2haicu is successful on the standby Server, run it on the primary Server.
8. When adding the database to the cluster, db2haicu will throw a warning saying 'The cluster node <Private IP-Address> was not found in the domain. Please re-enter the hostname. Enter the Public hostname used in setup 4.