How to stop a local SQL Server instance from command line or PowerShell? In this tutorial we’ll show you 5 simple ways to stop or start SQL Server service in SQL Server 2016/2014/2012/2005.
Method 1: Stop / Start SQL Server Service from Microsoft Services Console
- Press the Windows + R keys to open the Run box. Type services.msc and press Enter.
- This will open the Microsoft Services console. Find the service called SQL Server (instant name) and then double-click on it.
- In the Properties dialog box, you can see that the service name of my SQL Server instance is MSSQL$SQLEXPRESS. From there you can click the Stop button if your SQL Server service is running, or click the Start button to get the service up and running.
Method 2: Stop / Start SQL Server Service from Command Line
- Open an elevated Command Prompt.
- To stop a named SQL Server instance, type the following command. Replace SQLEXPRESS with the instance name.
net stop MSSQL$SQLEXPRESS
To start a named SQL Server instance, type:
net start MSSQL$SQLEXPRESS
Method 3: Stop / Start SQL Server Service from SQL Server Configuration Manager
- To get started, you need to open SQL Server Configuration Manager. In Windows Server 2008 or 2003, you can click Start > Programs -> Microsoft SQL Server > Configuration Tools > SQL Server Configuration Manager.
- In the left pane of SQL Server Configuration Manager, click SQL Server Services. We can see all services in right pane. Right-click on SQL Server service and you can then select Stop or Start from the context menu.
Method 4: Stop / Start SQL Server Service from PowerShell
- Open the PowerShell as administrator.
- You can use the Start-Service cmdlet to stop your SQL Server service. Replace SQLEXPRESS with the instance name.
Start-Service -Name 'MSSQL$SQLEXPRESS'
Or use the Stop-Service cmdlet to start your SQL Server service.
Stop-Service -Name 'MSSQL$SQLEXPRESS'
Method 5: Stop / Start SQL Server Service from SQL server Management Studio
- Open SQL server Management Studio and connect to your SQL Server instance.
- Right-click on the server in Object Explorer, you’ll have options to Stop, Start, Pause, Resume and Restart your SQL Server service. If we are not already connected, we can’t start a stopped instance.