Pages

Friday, July 25, 2008

SHUTDOWN

SHUTDOWN command in SQL Server is used to stop SQL Server Services.


SHUTDOWN [ WITH NOWAIT ]

WITH NOWAIT clause is an Optional parameter. Shuts down SQL Server without performing checkpoints in every database. SQL Server exits after attempting to terminate all user processes. When the server restarts, a rollback operation occurs for uncompleted transactions.

If you dont use this clause then shutdown happens in the following fashion.

1. Disabling logins (except for members of the sysadmin and serveradmin fixed server roles).
2. Waiting for currently running Transact-SQL statements or stored procedures to finish.
3. Inserting a checkpoint in every database.

No comments: