I believe like many developers I have both Visual Studio and SQL Server installed on my PC. Since I use the PC for various tasks not just for development, SQL Server is by defau
In Visual Studio, go to Tools -> External Tools...
Click the add button, and enter Start SQL Server for the title and for the command put:
C:\WINDOWS\system32\net.exe
For the arguments, put:
start mssqlserver
Untick "Close on exit" and tick "Use output window".
Repeat steps 2-4 to create the stop command, but for the arguments put:
stop mssqlserver
You know have two external tools configured which you can run by selecting them from the Tools menu in Visual Studio.
You can also add a shortcut button in any toolbar by right-cliking on the toolbar area, selecting customise, and then dragging the relevant external tool link (unfortunately VS refers to them as this, so you will have to figure out which one to choose) to a toolbar.
You should just simply go to the Services Manager, however to get there from VS 2008:
Another way would be the commaind line approach of:
net stop "SQL Server (MSSQLSERVER)" net start "SQL Server (MSSQLSERVER)"