Background Knowledge*
What Is HDR (High Availability Data Replication)?
Two identical servers on two identical machinesPrimary server
Fully functional server
All database activity – insert/update/deletes, are performed on this instance
Automatically sends logs to secondary server
Secondary server
Read only server : allows read only query
Always in recovery mode
Receives logs from primary and replay them to keep in sync with primary
When Primary server goes down, secondary server takes over as Standard server
HDR – Key points
Benifts:
- Easy of administration and setup
- Reduced downtime using DR switchover
- Update interval
- Automatic client redirection using DBPATH
- Improved performance by using secondary as report server
- Independent of geographic location
Limitations:
- Indexes are locked when created on primary (till they are shipped to secondary)
- No Replication of Blobspace blobs (only)
- Non logged databases are not replicated
Get your feet wet: configure the HDR in WebSphere Application Server
This section will present how to set the secondary connection properties and enable HDR in Application Server.
The following connection properties are needed to set in the connection URL:
INFORMIXSERVER_SECONDARY = secondary_server;
PORTNO_SECONDARY = secondary_portnumber;
IFXHOST_SECONDARY = secondary_hostmachine;
ENABLE_HDRSWITCH = true;
To set those properties, start the WAS server, and navigate to JDBC providers > Informix JDBC Driver > Data sources > Informix JDBC Driver DataSource > Custom properties, under the Custom properties, you could set HDR properties through “New” bottom. You have to add “ifx” before each property, for example:
ifxENABLE_HDRSWITCH true
ifxPORTNO_SECONDARY 12345
ifxIFXHOST_SECONDARY hostname_of_secondary
ifxINFORMIXSERVER_SECONDARY dbserver_name_of_secondary
Now, you could start to test the failover which works for me.
Resources:
JDBC Driver Programmer's Guide (Page 2-24)
* Informix High Availability Features -- John F. Miller III