Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

Stopping the FairCom Server

Only a user in the ADMIN group can stop the FairCom Server. The server can be stopped using the Windows Close icon or menu item, using the ctstop or ctadmn utilities, or by an application using the StopServer() function.

To stop the FairCom Server with the Close button in the upper-right corner of the application window, or with the Close item in the File menu, just click either object, as is common with any other Windows application. An ADMIN group User ID and password is required to complete the close operation.

To stop the FairCom Server with the module ctstop, a special client application:

  1. Start this program like any other.
  2. The stop module asks for four things:
    1. The ADMIN user ID, which must be ADMIN or a member of the ADMIN group.
    2. The user password, which is necessary for continuing with the procedure.
    3. The current name of the FairCom Server, if an alternative to the default name was given in the configuration file (see the keyword SERVER_NAME in Basic Configuration Options) to specify which FairCom Server to stop.
    4. The delay time (if any) before shutting down the FairCom Server. If a greater-than-zero delay is specified, the FairCom Server will not accept any new users or transactions. Logon attempts during the delay time specified will fail with error SHUT_ERR (150), which means, “The Server is shutting down”. New transactions cannot be started while waiting to shut down. They will return SHUT_ERR (150) or SGON_ERR (162), “Server gone”, depending on how far the shutdown process has gone.

    Tip: This can be given on a single line as:


The FairCom Server may also be stopped by an application program, as long as it supplies an ADMIN group User ID and password, using StopServer() discussed in the FairCom DB Programmer’s Reference Guide, (distributed only to FairCom DB developers).

During FairCom Server shutdown, messages reflect when communications terminate and when the final system checkpoint begins. In addition, two aspects of the shutdown that involve loops with two-second delays generate output indicating their status. The first loop permits the delete node queue to be worked down. The second loop permits clients to shutdown cleanly during FairCom Server shutdown. If these loops are entered, the FairCom Server could take a measurable amount of time to shut down, depending on the amount of work to be done, and output indicates how many queue entries or clients remain. A notice indicates whether everything was cleaned-up. A clean-up notice is NOT generated if a loop was not entered.

This output permits a FairCom DB Server Administrator to monitor the shutdown, and avoid an incorrect assumption about whether the FairCom Server is making progress or has hung during shutdown. After the FairCom Server shuts down, it sends a message saying FairCom Server operations have been terminated. The output is routed to the console and CTSTATUS.FCS, although the latter does not receive the numeric information concerning the number of queue entries or active clients.

Note: If the Replication Agent is running on a server, replication should be stopped before trying to stop the server. If replication is running when you attempt to stop the server, you will see error 792 (External server shutdown disabled).