Querying Server Configuration

From InterBase

Go Up to Querying the Services Manager


You can use the following items with isc_service_query() to request information about the InterBase server configuration.

Services API server configuration query items
Server configuration items Purpose Return
length
Return value

isc_info_svc_version

The version of the Services Manager.

4 bytes

Unsigned long

isc_info_svc_server_version

The version of the InterBase server.

2 bytes + string

String

isc_info_svc_implementation

The implementation string, or platform, of the server; for example, InterBase/Sun4.

2 bytes + string

String

isc_info_svc_get_license

All software activation certificate IDs and keys currently enabled on the server.

See below

See below

isc_info_svc_get_license_mask

A bitmask representing the software activation certificate options currently enabled on the server; reserved for future implementation.

4 bytes

Bitmask

isc_info_svc_capabilities

A bitmask representing the capabilities currently enabled on the server; reserved for future implementation.

4 bytes

Bitmask

isc_info_svc_get_config

The parameters and values in the ibconfig file on the server.

See below

See below

isc_info_svc_get_env

The location of the InterBase root directory on the server; this is the value of the $InterBase system environment variable, or the contents of the registry key.

2 bytes + string

String

isc_info_svc_get_env_lock

The location of the InterBase lock manager file on the server; this is the value of the $InterBase_LCK system environment variable, or by default $InterBase/serverhostname.lck.

2 bytes + string

String

isc_info_svc_get_env_msg

The location of the InterBase message file on the server; this is the value of the $InterBase_MSG system environment variable, or by default $InterBase/InterBase.msg.

2 bytes + string

String

Services API queries: Services Manager version

. . .
case isc_info_svc_version: {
unsigned long svcversion;
p += sizeof (unsigned short);
svcversion = (unsigned long)
isc_portable_integer (p, sizeof(unsigned long));
printf ("Service Manager Version: %d\n", svcversion);
p += sizeof (unsigned long);
break;
}
. . .

Services API queries: server version

. . .
case isc_info_svc_server_version: {
path_length = (unsigned short)
isc_portable_integer (p, sizeof(unsigned short));
p += sizeof (unsigned short);
buffer = (char*) malloc (path_length);
strncpy (buffer, p, path_length);
buffer [path_length] = '\0';
printf ("Server version: %s\n", buffer);
p += path_length;
break;
}
. . .

Services API queries: server implementation

. . .
case isc_info_svc_implementation: {
path_length = (unsigned short)
isc_portable_integer (p, sizeof(unsigned short));
p += sizeof (unsigned short);
buffer = (char*) malloc (path_length);
strncpy (buffer, p, path_length);
buffer [path_length] = '\0';
printf ("Server implementation: %s\n", buffer);
p += path_length;
break;
}
. . .

Services API queries: license mask

. . .
case isc_info_svc_get_license_mask: {
unsigned long mask;
printf ("License Information:\n");
p += sizeof (unsigned short);
mask = (unsigned long)
isc_vax_integer (p, sizeof(unsigned long));
if (mask & LIC_S)
printf ("\tRemote Server Enabled\n");
p += sizeof (unsigned long);
break;
}
. . .

Querying using Services API: server capabilities

. . .
case isc_info_svc_capabilities: {
unsigned long capabilities;
printf ("Server Capabilities:\n");
p += sizeof (unsigned short);
capabilities = (unsigned long)
isc_vax_integer (p, sizeof(unsigned long));
if (capabilities & MULTI_CLIENT_SUPPORT)
printf ("\tSupports multiple clients\n");
p += sizeof (unsigned long);
break;
}
. . .

Querying using Services API: location of the server root directory

. . .
case isc_info_svc_get_env: {
path_length = (unsigned short)
isc_portable_integer (p, sizeof(unsigned short));
p += sizeof (unsigned short);
buffer = (char*) malloc (path_length);
strncpy (buffer, p, path_length);
buffer [path_length] = '\0';
printf ("Value of $InterBase: %s\n", buffer);
free(buffer);
p += path_length;
break;
}
. . .

Querying using Services API: location of the server lock file

. . .
case isc_info_svc_get_env_lock: {
path_length = (unsigned short)
isc_portable_integer (p, sizeof(unsigned short));
p += sizeof (unsigned short);
buffer = (char*) malloc (path_length);
strncpy (buffer, p, path_length);
buffer [path_length] = '\0';
printf ("Path to <hostname>.lck: %s\n", buffer);
free(buffer);
p += path_length;
break;
}
. . .

Querying the location of the message file using the Services API

. . .
case isc_info_svc_get_env_msg: {
path_length = (unsigned short)
isc_portable_integer (p, sizeof(unsigned short));
p += sizeof (unsigned short);
buffer = (char*) malloc (path_length);
strncpy (buffer, p, path_length);
buffer [path_length] = '\0';
printf ("Path to InterBase.MSG: %s\n", buffer);
p += path_length;
break;
}
. . .

Topics

Advance To: