To run the solidDB server as a service, you must first install the service, and then start the service with the Windows Service dialog or command prompt.
Before you begin
▪ The database must have been created by starting the server as a foreground process, see Starting a solidDB server. If solidDB is running as a service, the server does not interact with a display and cannot create a new database.
▪ The solidDB server that you intend to run as a service cannot be located on a network drive.
Procedure
To configure Windows to run solidDB as a service, run the following command at an administration command prompt:
▪ solid_command is either solid, or for SMA, solidsma
▪ service_name is the name of the service
▪ fullexepath is the full path for solid.exe (or solidsma.exe)
▪ working directory is the full path for solidDB working directory (where your solid.ini configuration file and license file are located).
▪ autostart is an optional parameter that sets the startup type of the service to Automatic, that is, solidDB runs automatically as a service when Windows is started.
▪ Regardless of the autostart parameter, the service is not started automatically at the time of installation. For the first time, the service has to be started manually in the Windows Services dialog or command prompt.
▪ option is one of the Command line options. For example, when using an encrypted database, the encryption password must be provided with the -S<password> option.
Example 1
The following command installs a service named SOLID (with startup type Manual) when solidDB is installed in the directory C:\soliddb, and the working directory is C:\soldidb:
The following command installs a service named SOLIDSMA (with startup type Manual) when the SMA server is installed in the directory C:\soliddb and the working directory is C:\soliddb.
The following command installs a service named SOLID (with startup type Automatic) when solidDB is installed into the directory C:\solidDB and the working directory is C:\solidDB. The next time Windows is started, solidDB runs automatically as a service.
The following command installs a service named SOLID (with startup type Manual) when solidDB is installed into the directory C:\solidDB and the working directory is C:\solidDB. The solidDB database is encrypted; the encryption password is abcd:
Alternatively, you can create the service by using the Windows command-line utility sc.exe. In that case, to start solidDB in a services mode, you must include the solidDB -sstart command-line option in the command. For example:
The -sstart command-line option is required to remove the GUI-based interactions between the solidDB server and the user. Programs running as a Windows service cannot use GUI-based interactions.
You can then start the service manually in the Windows Services dialog or command prompt.
▪ To use the Windows Services dialog, click Control Panel > Administrative Tools > Services.
▪ To use the command prompt, run the following command:
sc start service_name
Results
When running as an Windows service, solidDB logs warning and error messages to the Windows event log. These messages can be viewed from Windows by using the Event Viewer, available through Control Panel: Control Panel > Administrative Tools > Event Viewer. Messages are also logged to the solmsg.out file.