Setting up a connection to an HADR-enabled DB2 database

If you are using DB2 Version 8.2 or later as a datasource, you might want to take advantage of the high availability disaster recovery (HADR) functionality that is available in these versions of DB2. Even though you must Install two instances of DB2 on your machine before you can use the HADR functionality, you 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.

About this task

If you want to use an HADR-enabled DB2 database, you must configure your DB2 data source to be of Type2 or Type4, and configure the DB2 automatic client reroute (ACR) option for this data source.

Procedure

  1. In the administrative console, click Resources > JDBC > Data sources.
  2. Click the name of your DB2 data source.
  3. Under Additional Properties, click WebSphere Application Server data source properties.
  4. Under Advanced DB2 features, enter the settings for your DB2 automatic client reroute
  5. Click Apply or OK, and then click SAVE to save your 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 you do not see this message, investigate the problem with the help of any error messages that display.