views:

567

answers:

4

I need to start and stop SQL Server from the command line. I am willing to write a small C# program if necessary, but I suspect that there's something (PowerShell, maybe?) that currently exists that does this gracefully.

Thank you

+8  A: 

net {start|stop} mssqlserver

P Daddy
Thank you very much. You were the quickest finger on the trigger!
rp
+3  A: 

net start/stop

http://technet.microsoft.com/en-us/library/cc736564.aspx

Brian Rudolph
+2  A: 

Or, in PowerShell, Stop-Service, Start-Service, or Restart-Service. Note that all of this has to be done on a per-instance basis, just as with the other suggestions here.

Don Jones