Tuesday, July 22, 2008

Start or Stop MS SQL Server using a shortcut

If you are like me you don't always develop against SQL Server on you local computer. Most of the time I use one of the servers in the office. I never seem to have enough memory, so I don't have the MS SQL Server service launch on startup. This saves memory for other things I am doing. However, when I want to start MS SQL Server, I hate navigating and starting it manually. I figured out that I can start it just by double-clicking a windows shortcut and that is really nice. I don't recommend making a shortcut that points to the sqlserver.exe, instead I recommend creating a shortcut that just starts the windows service. This way it is fully accessible, and works the way it was meant to. Here is what you do.
  1. Create a new shortcut.
  2. When it asks you to browse or specify the location of what you want the shortcut to point to, enter the following: cmd /c net start MSSQLSERVER
  3. Click next, and call the shortcut whatever you want.

Click finish, and that is it. Now you can start MS SQL Server manually, but with the click of an icon. You can stop it the same way, just use the following command: cmd /c net stop MSSQLSERVER

2 comments:

Anonymous said...

This totally Rocks!! Thank you so much. The one thing that I DO miss about SQL 6.5 was the little start/stop icon in the notification area!

Anonymous said...

Great tip, thanks a lot!