The Shutdown method stops a running Microsoft® SQL Server™ service.
object.Shutdown( [ Wait ] )
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list. |
Wait | Optional. True or False as described in Remarks. |
When Wait is True (default), SQL Server performs an orderly shutdown: disabling logins, waiting for transaction or stored procedure completion, and checkpointing open databases.
When Wait is False, the SQL Server service performs an immediate shutdown.
HRESULT Shutdown(BOOL bWait = TRUE);