solidDB Help : solidDB reference : solidDB Server Control (SSC) API : SSC API reference : SSCStartDisklessServer
  
SSCStartDisklessServer
The SSCStartDisklessServer function starts a diskless server using the linked library access.
SscRetT SSC_CALL SSCStartDisklessServer (int argc, char* argv[ ],
    SscServerT * h, SscStateT runflags, char* lic_string,
        char* ini_string);
Parameters
The following table describes the parameters:
 
Parameters
Usage type
Description
argc
in
The number of command-line arguments.
argv
in, use
Array of command-line arguments that are used during the function call. The argument argv[0] is reserved only for the path and filename of the user application and must be present.
For a list of available arguments, see Command line options.
h
out
Returns a handle to the started server. This handle is needed when referencing the server with other Control API functions.
runflags
in
The value for this parameter is a combination of 2 flags: the open flag and the netcopy disabling flag. The following flag symbols can be used:
SSC_STATE_OPEN – the open flag is set to 1: new connections are allowed.
SSC_STATE_CLOSED – the open flag is set to 0: all new network and LLA connections are rejected, except for connections from solidDB Remote Control (solcon) program.
SSC_DISABLE_NETCOPY – the netcopy disabling flag is set to 1: in HotStandby configuration, no netcopy can be received by the server for which the SSC_DISABLE_NETCOPY is set.
The flag does not prevent the server to act as a source of netcopy. If only SSC_DISABLE_NETCOPY flag is set, the server is in the closed state. To enable netcopy, use the SSC API function SSCSetState() with the runflag value SSC_STATE_OPEN or SSC_STATE_CLOSED.
runflags = SSC_STATE_OPEN | SSC_STATE_CLOSED | SSC_DISABLE_NETCOPY
Note The flags can be used in combinations, for example:
...
rc = SSCStartServer(g_argc, g_argv, &hh, SSC_STATE_OPEN|SSC_DISABLE_NETCOPY);
...
If the server is started as closed, it can be opened with ADMIN COMMAND 'open', or with the solcon command open. The same effect can be achieved with the SSC API function SSCSetState().
lic_string
in
Specifies the string that contains the solidDB license file.
ini_string
in
Specifies the string that contains the solidDB configuration file.
Return value
SSC_SUCCESS - The server is started.
SSC_ERROR - The server failed to start.
SSC_SERVER_INNETCOPYMODE - The server is netcopy mode (HotStandby only).
SSC_INFO_SERVER_RUNNING - The server is already running.
SSC_INVALID_HANDLE - Invalid local server handle given.
SSC_INVALID_LICENSE - No license or invalid license file found.
Comments
By default, the state is set to SSC_STATE_OPEN.
This function has no corresponding solidDB SQL extension ADMIN COMMAND.
Example: SSCStartDisklessServer
SscStateT runflags = SSC_STATE_OPEN;
SscServerT h;
char* argv[4]; /* pointers to four parameter strings */
int argc = 4;
char* lic = get_lic(); /* get the license */
char* ini = get_ini(); /* get the solid.ini */
SscRetT rc;
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 diskless server */
rc = SSCStartDisklessServer(argc, argv, &h, runflags, lic, ini);
In the example, get_ini() and get_lic() are functions that the user must write. Each must return a string that contains the solid.ini file text and the solid.lic license file text respectively.
If you do not specify a catalog name, the server returns an error.
Go up to
SSC API reference