This blog promotes knowledge sharing through experience and collaboration. For more product information, visit our WebSphere Commerce CSE page. For easier navigation, utilize the Categories to find posts that match your interest.
Using an HADR instance with the WCS Utilities
If you are using an HADR-enabled database, you have likely configured the WAS Data Sources for HADR, but you might have not realized that it is also possible to configure HADR and other properties with the Commerce utilities. This is useful, for example, if you attempt to Data Load or Stageprop after a failover. In this post, I will show you how to configure this.
Most utilities use a common connection acquisition framework that allows you to configure and customize the connection. This is done in alldbconnector.xml. In this file, you can add the necessary HADR properties and these will be shared by all the utilities that connect to the same database. See Database connection acquisition for utilities and Ant tasks in the KC for more details.
For HADR in particular, the following configurations can be added. This will enable the utilities to use the standby server after a failover:
Alternatively, you can also specify JDBC connection properties when you use the full JDBC URL format with the database name parameter, as in the following example:
Finally, I wanted to leave you with a couple of useful references for this config. Checkout the following links: Switching database roles in high availability disaster recovery (HADR) and Operation of automatic client reroute for connections to DB2 for Linux, UNIX, and Windows from Java clients.