Share via


How to: Stop an Instance of SQL Server (net Commands)

The Microsoft SQL Server service can be stopped using Microsoft Windows net commands.

Note

To ensure an orderly shutdown, you should pause SQL Server and stop the SQL Server Agent service before stopping an instance of SQL Server. You can do both using net commands, or SQL Server Configuration Manager.

To stop the default instance of SQL Server

  1. From a command prompt, enter one of the following commands:

    net stop "SQL Server (MSSQLSERVER)"

    -or-

    net stop MSSQLSERVER

To stop a named instance of SQL Server

  1. From a command prompt, enter one of the following commands. Replace instancename with the name of the instance you want to manage.

    net stop "SQL Server (instancename)"

    -or-

    **net stop MSSQL$**instancename

    Note

    Stopping an instance of SQL Server with the net stop command causes SQL Server to perform a checkpoint in all databases, saving all changed data to disk.

See Also

Tasks

How to: Broadcast a Shutdown Message (Command Prompt)
How to: Start an Instance of SQL Server (net Commands)
How to: Stop an Instance of SQL Server (SQL Server Configuration Manager)
How to: Stop an Instance of SQL Server (SQL Server Management Studio)
How to: Start an Instance of SQL Server (SQL Server Configuration Manager)
How to: Pause and Resume an Instance of SQL Server (net Commands)

Concepts

Stopping Services

Help and Information

Getting SQL Server 2005 Assistance