Set up a connection to an HADR-enabled DB2 database
If we are using DB2 v8.2 or later as a datasource, we might want to take advantage of the high availability disaster recovery (HADR) functionality that is available in these versions of DB2. Even though we must Install two instances of DB2 on the machine before we can use the HADR functionality, we only need to configure the primary DB2 database as a data source. The HADR functionality that the primary DB2 database provides automatically handles the rerouting of data to the backup DB2 database.
To use an HADR-enabled DB2 database, configure your DB2 data source to be of Type2 or Type4, and configure the DB2 automatic client reroute (ACR) option for this data source.
Tasks
- In the administrative console, click...
Resources > JDBC > Data sources.
- Click the name of our DB2 data source.
- Under Additional Properties, click WAS data source properties.
- Under Advanced DB2 features, enter the settings for our DB2 automatic client reroute
- Click Apply or OK, and then click SAVE to save the changes to the master configuration.
What to do next
Test the connection to your DB2 database by selecting the check box next to the data source and clicking Test connection. A message similar to Test Connection for datasource DB2 Data source on server server1 at node MyNode was successful is displayed. If we do not see this message, investigate the problem with the help of any error messages that display.
WAS data source properties