This task applies to shutting down standard solidDB servers and servers with Shared Memory Access (SMA).
If you are using solidDB with Linked Library Access (LLA), the server follows the lifecycle of the application process. Startup and shutdown are controlled by the linking process; see Starting and stopping the LLA server.
To shut down solidDB programmatically from an application, for example, using solidDB Remote Control (solcon) or solidDB SQL Editor (solsql), complete the following steps:
1 Prevent new connections to solidDB by issuing the following command:
ADMIN COMMAND 'close'
To revert the effect of the close command, run the ADMIN COMMAND 'open' command.
2 Exit all users of solidDB (except the current connection) by issuing the following command:
ADMIN COMMAND 'throwout all'
The ADMIN COMMAND 'throwout all' command does not wait for open transactions to finish; it rolls back all open transactions.
3 Stop solidDB by issuing the following command:
ADMIN COMMAND 'shutdown'
To shut down solidDB using a single command, run the following command:
ADMIN COMMAND 'shutdown force'
The shutdown force command performs the same operations as close, throwout all, and shutdown.
Note In Windows environments, you can right-click the server icon and select Close or, if you are running solidDB as a service, you can use the commands net stop or sc stop through the Windows system services.
It is also possible to stop the solidDB server in SMA mode by having the application call an SSC API function SSCStopServer(). Only one application can start and stop the SMA server. The same application that started the SMA server must also perform the shutdown. For details, see SSCStopServer.
All buffered data is now written to the database file, cache memory is freed, and the server is shut down. The server shutdown can take a while since the server must write all buffered data from main memory to the disk.