Previous Topic

Next Topic

Stopping the c-treeACE Server

Only a user in the ADMIN group can stop the c-treeACE 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 c-treeACE 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 any other Windows application. An ADMIN group User ID and password is required to complete the close operation.

To stop the c-tree 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 ADMIN password, which is necessary for continuing with the procedure.
    3. The current name of the c-treeACE 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 c-treeACE Server to stop.
    4. The delay time (if any) before shutting down the c-treeACE Server. If a greater-than-zero delay is specified, the c-treeACE 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.

The c-treeACE 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 c-treeACE Programmer’s Reference Guide, (distributed only to c-treeACE developers).

During c-treeACE 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 c-treeACE Server shutdown. If these loops are entered, the c-treeACE 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 c-treeACE Server Administrator to monitor the shutdown, and avoid an incorrect assumption about whether the c-treeACE Server is making progress or has hung during shutdown. After the c-treeACE Server shuts down, it sends a message saying c-treeACE 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.