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
From stackoverflow
-
net {start|stop} mssqlserver
rp : Thank you very much. You were the quickest finger on the trigger! -
net start/stop
-
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.
0 comments:
Post a Comment