You can start, restart, and shut down the LLA server using the SSC API, ODBC API, or SA API function calls. The ODBC API and SA API function calls can be used to start the server only if a database exists already. The SSC API can be used to create a database at the startup.
At server startup, recovery is performed if needed before control returns to the application. Therefore, if the server is successfully started, it is ready to serve application requests. For the duration of the application process, the server can be started or stopped as needed.
Explicit startup and shutdown with SSC API
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.
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 SSCAPI function SSCStartDisklessServer.
Implicit startup and shutdown with ODBC API and SA API
The ODBC API and SA API can only be used to start and shut down the LLA server implicitly. When the application connects locally to LLA server for the first time, it calls the ODBC API function SQLConnect or SA API function SaConnect. In this case, shut down occurs when the last local connection disconnects from the server using either function SQLDisconnect or SaDisconnect.
When the LLA server is started implicitly from the application, it checks if a database exists in the working directory. If a database file is found, the server opens that database automatically. If a database file is not found, the server returns an error.
The server does not create a database during implicit startup. To create a database, you must use an explicit startup function, such as SSCStartServer with the appropriate parameters, or create a database as for a non-linked server.