Administrator Guide : Administering solidDB® : Running solidDB® server as a Windows service : Starting solidDB® server as a service for the first time
  
Starting solidDB® server as a service for the first time
The first time you want 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
If you have not created a database before, you must create the database by starting the server for the first time as a foreground process. If solidDB® is running as a service, it does not interact with a display and cannot create a new database. You can start the server as a foreground process from the command line with the command solid or use the Start solidDB® icon in the Programs menu.
The solidDB® that you intend to run as a service cannot be located on a network drive.
Procedure
1 Allow (install) Windows to run solidDB® as a service. In the command prompt, issue the following command:
solid -s"install,<service_name>,<fullexepath> -c<working directory>[,autostart] [<option>]"
where
<service_name> is the name of the service
<fullexepath> is the full path for solid.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> can be one of the solidDB® 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 into the directory C:\soliddb and the working directory is C:\soldidb:
solid -s"install,SOLID,C:\soliddb\bin\solid.exe -cC:\solidDB"
Example 2
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.
solid -s"install,SOLID,C:\solidDB\bin\solid.exe ‑cC:\solidDB,autostart"
Example 3
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:
solid -s"install,SOLID,C:\soliddb\bin\solid.exe -Sabcd ‑cC:\soliddb"
Alternatively, you can create the service 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:
sc create SOLID binPath= "c:\soliddb\bin\solid.exe -cC:\soliddb ‑sstart"
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.
1 Start the service manually in the Windows Services dialog or command prompt.
You can access the Windows Services dialog through Control Panel: Control Panel > Administrative Tools > Services.
2 In the command prompt, issue the following command:
sc start <service_name>
or
net start <service_name>
Results
When running as an Windows service, solidDB® will log 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.
See also
Running solidDB® server as a Windows service