solidDB Help : Samples : HotStandby sample : Watchdog sample application : Using the Watchdog sample application
  
Using the Watchdog sample application
Complete the following steps to run the Watchdog sample application in a HotStandby (HSB) environment.
1 Compile the Watchdog sample application, see HotStandby sample.
2 Copy the compiled executable to the machine where you want to run the Watchdog sample application. Ideally, you should run the application on a separate server to the HSB servers but you can run the application on the secondary server if necessary. For limitations that are associated with running the Watchdog sample application on the secondary server, see Co-locating a watchdog with an HSB server.
3 If you are going to allow the Watchdog sample application to switch the state of servers when a failure happens, make sure that the following parameters are set:
HotStandby.AutoPrimaryAlone is set to NO in the solid.ini for both primary and secondary servers.
Watchdog.AutoSwitch is set to YES in the solid.ini for the Watchdog sample application.
Important Both parameters should not be set to YES, or there is a risk that you might have two primary servers after a failure situation is resolved, see Dual primary servers.
4 Configure the appropriate parameters in the solid.ini file for the Watchdog sample application, see [Watchdog] section of the solid.ini configuration file. Use the solid.ini that is supplied with the sample application (samples\hsb\watchdog\solid.ini) for guidance.
5 Open a command prompt in the current working directory of the Watchdog sample application and run the following command:
watchdog
If you have not specified the user names and passwords for the primary and secondary servers in the solid.ini file, the Watchdog sample application prompts you for them.
The Watchdog sample application starts in normal mode and pings both servers to check which one is the primary server. The Watchdog sample application remains in normal mode unless or until it determines a server (or network) failure has occurred (after the number of ping attempts is exceeded). If a failure occurs, the Watchdog sample application switches to failure mode, see Failure situations and watchdog actions.
When both the primary and secondary servers are up and reconnected, the Watchdog sample application switches to normal mode again.
Go up to
Watchdog sample application