Stops SQL Server. Only the system administrator can execute this statement.
SHUTDOWN [WITH NOWAIT]
where
Unless the system administrator uses the WITH NOWAIT option, SHUTDOWN tries to shut down SQL Server in an orderly fashion by:
Using the SHUTDOWN statement minimizes the amount of automatic recovery work needed when the system administrator restarts SQL Server.
The following tools and methods can also be used to stop SQL Server. Each of these performs a checkpoint in all databases and then a SHUTDOWN WITH NOWAIT to flush all committed data from data cache and stop the server quickly.
SQL Server can also be stopped by the following methods. Because these methods do not perform checkpoints in each database prior to shutdown, they are not recommended and may increase the recovery time needed the next time the server is restarted. You can stop SQL Server in these additional ways:
SHUTDOWN permission defaults to the system administrator and cannot be transferred.
sqlservr Command-line Executable | sp_who System Stored Procedure |
sp_lock System Stored Procedure |