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

  • 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

  • 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.