Export (0) Print
Expand All
ABS
ALL
AND
ANY
AVG
bit
COS
COT
DAY
EXP
GO
IN
LEN
LOG
MAX
MIN
NOT
OR
PI
SET
SIN
STR
SUM
TAN
USE
VAR
Expand Minimize

SHUTDOWN

SQL Server 2000

  New Information - SQL Server 2000 SP3.

Immediately stops Microsoft® SQL Server™.

Syntax

SHUTDOWN [ WITH NOWAIT ]

Arguments

WITH NOWAIT

Shuts down SQL Server immediately, without performing checkpoints in every database. SQL Server exits after attempting to terminate all user processes, and a rollback operation occurs for each active transaction.

Remarks

Unless members of the sysadmin or serveradmin fixed server roles specify the WITH NOWAIT option, SHUTDOWN tries to shut down SQL Server in an orderly fashion by:

  1. Disabling logins (except for members of the sysadmin or serveradmin fixed server roles). To see a listing of all current users, execute sp_who.

  2. Waiting for currently executing Transact-SQL statements or stored procedures to finish. To see a listing of all active processes and locks, execute sp_lock and sp_who.

  3. Performing a checkpoint in every database.

Using the SHUTDOWN statement minimizes the amount of automatic recovery work needed when members of the sysadmin or serveradmin fixed server roles restart SQL Server.

These tools and methods can also be used to stop SQL Server. Each of these performs a checkpoint in all databases. All committed data from data cache is flushed, and then the server is stopped:

  • By using SQL Server Enterprise Manager.

  • By using net stop mssqlserver from a command prompt.

  • By using Services in Control Panel.

  • By using SQL Server Service Manager.

If sqlservr.exe was started from the command-prompt, pressing CTRL+C shuts down SQL Server. However, pressing CTRL+C does not perform a checkpoint.

Note  The SQL Server Enterprise Manager, net stop, Control Panel, and SQL Server Service Manager methods of stopping SQL Server produce the identical service control message of SERVICE_CONTROL_STOP to SQL Server.

Permissions

SHUTDOWN permissions default to members of the sysadmin and serveradmin fixed server roles, and are not transferable.

See Also

CHECKPOINT

sp_lock

sp_who

sqlservr Application

Stopping SQL Server

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft