A user asked me recently if it was possible to start and stop a SQL Server Service using command line. The answer is YES and it is quite easy to do so as shown below:
Open your windows command prompt and type the following command to Stop, Start, Pause and Continue a SQL Server Instance.
Note: If you are running this on Vista or higher OS, you may have to run the command prompt as administrator. Go to Start > All Programs > Accessories > Right click Command Prompt > Run as Administrator
To Stop, Start, Pause and Resume a SQL Server Default Instance
Stop – net stop MSSQLSERVER
Start – net start MSSQLSERVER
Pause – net pause MSSQLSERVER
Continue – net continue MSSQLSERVER
To Stop, Start, Pause and Resume a SQL Server Named Instance
Note: I have a named instance called SUPROTIM2 on my machine.
Stop – net stop “SQL SERVER SUPROTIM2”
Start – net start “SQL SERVER SUPROTIM2”
Pause – net pause “SQL SERVER SUPROTIM2”
Continue – net continue “SQL SERVER SUPROTIM2”
Did you like this post?
|subscribe via rss||subscribe via e-mail|
|print this post||follow me on twitter|