NOTE: This article only applies to OPSSQL version 6.x. Configuration steps for Watchdog are different for other versions.
This service's sole purpose is to monitor the state of the OPS SQL database and start and stop the OPS SQL services depending on the database state. If connectivity to your database is lost while the services are running, the WatchDog service will detect that and shut the services down. Once the database comes back up, the WatchDog service will then start the services.
The WatchDog service can be configured to monitor multiple services.
Running the OPS SQL setup from your CD you will see the following screen:
The WatchDog service is last in the list. In this example, the only services chosen for installation are LiveUpdate and AdoCalc, which means the WatchDog service will monitor ONLY those services. This can be changed after setup is complete.
The WatchDog service files are in the WatchDog sub-folder of your OPSSQL folder (by default C:\OPSSQL)
To configure the service, you edit the WatchDog.ini file, which by default should look something like this:
The parameters that are important are:
- POLL_EVERY_MS - This is the number of miliseconds to wait before polling the Database to see if its state has changed. By default this is 500ms, so it's 1/2 seconds.
- CONNECTION_TIMEOUT_S - The amount of time the connection attempt to the database has before it gives up, in seconds. By default, it's 10 seconds.
This means that the WatchDog service will try to open a connection to the database every 500 miliseconds and wait for that connection to open for 10 seconds before giving up and and determining that the database is down.
- NTSERVICE - A service to monitor. For every service you wish the WatchDog to monitor, add one NTSERVICE entry in the ini file.
In this example, the WatchDog is configured to monitor the DBA Helper and AdoCalc services.