+

Search Tips   |   Advanced Search

Set up a connection to an HADR-enabled DB2 database

If we 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 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 the DB2 data source to be of Type2 or Type4, and configure the DB2 automatic client reroute (ACR) option for this data source.

  1. In the console, click Resources > JDBC > Data sources.

  2. Click the name of the 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 the changes to the master configuration.


What to do next

Test the connection to the 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.


Related

  • WebSphere Application Server data source properties