SE_instance_control

Controls the state of the connected instance.

Usage syntax

LONG SE_instance_control (const CHAR *server, const CHAR *instance, const CHAR *password, LONG option, LONG pid);

Parameters
server The name of the server ArcSDE is running on
instance The ArcSDE instance name
password The ArcSDE user password for this instance
option The control option code
pid The server process ID
Description

SE_instance_control controls the operation of an ArcSDE instance. You can shut down, pause, or restart an ArcSDE instance. You can also delete individual server processes or all currently connected servers.

The following control options are available:

1    SE_CONTROL_INSTANCE_SHUTDOWN       /* Shuts the connection down */

2    SE_CONTROL_INSTANCE_PAUSE          /* Disallows further connections */

3    SE_CONTROL_INSTANCE_RESUME         /* Allows connections again (after pausing the instance) */

4    SE_CONTROL_INSTANCE_KILL           /* Kills a specified server task */

5    SE_CONTROL_INSTANCE_KILL_ALL       /* Kills all currently connected servers */

6    SE_CONTROL_INSTANCE_START          /* Starts the connection */

7    SE_CONTROL_INSTANCE_UPGRADE_PAUSE  /* Pauses the instance so it can be upgraded; different than pause
                                        because it allows the ArcSDE administrator to connect */

You need to specify the pid only when using the SE_CONTROL_INSTANCE_KILL control option.

Using this function with the option SE_CONTROL_INSTANCE_START only works if:

Otherwise, the function returns SE_IOMGR_NOT_AVAILABLE.
Returns

SE_SUCCESS
SE_FAILURE
SE_INVALID_DBA_PASSWORD
SE_INVALID_PARAM_VALUE
SE_INVALID_POINTER
SE_INVALID_SERVER
SE_IOMGR_NOT_AVAILABLE
SE_INSTANCE_NOT_AVAILABLE
SE_INSTANCE_UPGRADE_PAUSE_STATUS
SE_NET_FAILURE
SE_OUT_OF_CLMEM
SE_OUT_OF_SVMEM
SE_SERVICE_NOT_FOUND

Notes

∙  After a shutdown operation, the only valid operation on that handle is an SE_connection_free call.