Recovering an HDR cluster after the secondary server became the primary server
If a secondary server in an HDR cluster became the primary server after the original primary server failed, you can use a script to reestablish the original primary and convert the current primary server back to a secondary server.
About this task
Suppose the primary server, named srv_pri, has encountered an error that has caused it to fail over to an HDR secondary server named srv_hdr_sec. At this point, the primary server is srv_hdr_sec, and any other secondary servers in the cluster are now pointing to srv_hdr_sec.
To restore the cluster to the way it was before srv_pri failed over, follow these steps:
Procedure
- Initialize srv_pri as the HDR secondary server by
running the appropriate command:UNIX™ systems:
$INFORMIXDIR/bin/hdrmksec.sh srv_hdr_sec
Windows™ systems:hdrmksec.bat srv_hdr_sec
- Change srv_pri to the primary server by running:
This command makes srv_pri the primary server, and redirects any other secondary servers in the cluster to point to the new primary server. The command also shuts down the old HDR primary (srv_hdr_sec) because only a single primary server can exist in a high-availability environment.onmode -d make primary srv_pri
- Initialize srv_hdr_sec as the HDR secondary server
by running the following command: On UNIX™ systems:
$INFORMIXDIR/bin/hdrmksec.sh srv_pri
On Windows™ systems:hdrmksec.bat srv_pri