Activates an Open Data Services event outside the context of a client connection.
Important This Open Data Services function or macro is only supported in Microsoft® SQL Server™ version 7.0 for backward compatibility.
For more information about Open Data Services functions or macros supported for backward compatibility, see Open Data Services (Level 3).
int srv_setevent (
SRV_SERVER * server,
int event );
Event | Description |
---|---|
SRV_EXIT | Shuts down the server immediately, regardless of whether further client events are pending. |
SRV_RESTART | Continues the server after it has been paused. |
SRV_SLEEP | Pauses the server; no new connections are allowed. |
SRV_STOP | Disables new connections and then waits until all users have exited before shutting down the server. |
SUCCEED or FAIL.
The srv_setevent function is usually used to shut down, pause, or continue the server in response to a Windows NT Service Control Manager request, or inside a CTRL+C handler. Unlike srv_event, srv_setevent does not require a SRV_PROC client connection handle.
srv_event |