Very frequently I start and stop default istance of Sql Server, to deploy new stuff on the server or on my local machine.
I created two batch files on my desktop to speed up this operation.
First of all we test if the command line script run correctly or not.
Click Start -> Run -> type "cmd" to start command prompt.
Start SqlServer Default Istance
Type "net start mssqlserver" and press Enter.
Stop SqlServer Default Istance
Type "net stop mssqlserver" and press Enter.
If two commands run correctly, we can go on to create the batch files.
p.s. If you use Windows Vista, you must launch the commands with administrator privileges.
Create the shortcuts
Right click on desktop and select New -> Text Document.
Rename the file with "start sqlserver.bat"
Put the command "net start mssqlserver" in the file and save.
Right click on desktop and select New -> Text Document.
Rename the file with "stop sqlserver.bat"
Put the command "net stop mssqlserver" in the file and save.
If you use Windows Vista, right click and select "Run as administrator".