Setting up High-Availability Data Replication (HDR) is well documented, but users of IDS on Windows have to jump through one extra hoop compared to UNIX users.
When IDS is installed and initialized on Windows it puts the dbspaces in a path which contains the INFORMIXSERVER name. For example c:\ifmxdata\my_server1\rootdbs_dat.000.
A requirement for setting up HDR between two servers is that they both have the same dbspace paths, so in this example if the secondary server is called my_server2 the IDS instance will need to be re-initialized with a new root dbspace location to match that of my_server1.
Setting up HDR on a single machine
Suppose for testing purposes you want to operate HDR between two instances on a single machine (something our QA department likes to do from time to time)..
On UNIX this can be done by setting the onconfig parameter ROOTPATH to a relative value (as opposed to an absolute path), for example "rootdbs". This will cause oninit to look for a root dbspace in a path relative to its current working directory (which is wherever oninit was started from). If the primary and secondary HDR servers are installed in different directories but have the same relative path settings for dbspaces the standard set up method can be followed and the instances can connect and replicate successfully even on the same machine.
On Windows IDS is generally started as a Windows service... so what is the current working directory of the oninit process?
The answer is %INFORMIXDIR%\bin - so to set up HDR between two instances on a single Windows machine:
1. Install two IDS instances in separate directories.
2. Create an empty root dbspace file somewhere under %INFORMIXDIR%\bin for each instance.
3. Set the ROOTPATH onconfig parameter to the relative location under %INFORMIXDIR%\bin for each instance.
4. Follow the standard HDR set up steps.
Having to put a dbspace under the bin directory is a bit of a kludge and a bug (176568) was recently logged to address that.
A colleague reminded me there is one way you can choose the current working directory for the oninit process on Windows, and that is to run oninit in foreground - it will pick up the cwd from the location of the command line prompt as it does for UNIX - following this method you wouldn't require the IDS instances to be installed in different directories - just start them from different directories. The only downside is you are left with two windows running oninit.exe in foreground on your desktop.
Hacking HDR on Windows