Search

Wednesday, April 25, 2012

Start, Stop or Restart SQL Server from Command Prompt

Start SQL Server from command prompt:


net start mssqlserver


If you try to start a SQL Server which is already started then you will get this error: 



The requested service has already been started.
More help is available by typing NET HELPMSG 2182.

Stop SQL Server from command prompt:


net stop mssqlserver



If you try to stop a SQL Server which is already stopped then you will get this error: 


The SQL Server (MSSQLSERVER) service is not started.
More help is available by typing NET HELPMSG 3521.

Restart SQL Server from command prompt:


net stop mssqlserver
net start mssqlserver

No comments:

Post a Comment