Explicitly starting and stopping an LLA server with SSC API calls
The SSC API is used to start and shut down the LLA server explicitly. The application calls the SSC API function SSCStartServer to start the server and SSCStopServer to shut it down, see SSCStartServer and SSCStopServer.
When you start a new LLA server that does not already have a database, you must specify explicitly that a new database is created. To create a database, include the following parameters with the SSCStartServer() function:
-Uusername -Ppassword -Ccatalogname (the default database catalog name)
Note If you want to start a diskless server, you must start the server with SSC API function SSCStartDisklessServer, see SSCStartDisklessServer.
Starting LLA server without an existing database
When you start the server for the first time, solidDB creates a database only if you have specified the database administrator user name, password, and a name for the default database catalog.
For example:
SscServerT h; char* argv[4]; argv[0] = "appname"; /* path and filename of the user app. */ argv[1] = "-UDBA"; /* user name */ argv[2] = "-PDBA"; /* user's password */ argv[3] = "-CDBA"; /* catalog name */ /* Start the server */ rc = SSCStartServer(argc, argv, &h, run_flags);
If you start the server without an existing database and do not specify a database catalog name, solidDB returns an error that the database is not found.
By default, the database is created as one file (with the default name solid.db or the name you specified in the solid.ini file) in the solidDB working directory. An empty database containing only the system tables and views uses approximately 850 KB of disk space. The time it takes to create the database depends on the hardware platform you are using.
After the database has been created, solidDB starts listening to the network for remote client connection requests.
Starting LLA server with an existing database
If you already have an existing database, you do not need to specify the user name and password, or the catalog name in the SSCStartServer function call.
Shutting down LLA server with SSCStopServer
If the server is started by SSCStartServer, then it must be shut down with the following function call in the embedded application:
SSCStopServer()
For example:
/* Stop the server * / SSCStopServer (h, TRUE);
Note You can use the explicit method SSCStopServer to shut down a server that was started with implicit methods (SQLConnect). The converse is not true; for example, you cannot use SQLDisconnect to stop a server that was started with SSCStartServer.