tags:

views:

159

answers:

7

I have SQL Server Express on my laptop. I only need to hit it every few weeks. Running SQL Server sucks up a fair bit of memory on my laptop so I was wondering what is the easiest way to turn off SQL Server when not using it?

What I have done thus far is to create two batch files on my desktop. One brings SQL Server up with this command:

net start "sql server (sqlexpress)"

and the other takes it down with this:

net stop "sql server (sqlexpress)"

Is there a more elegant way to do this? Maybe a tool try app or something other than batch files?

A: 

Control Panel>Administrative Tools>Services

Find MSSQL service and disable it or put it to start on manual request.

George
yes indeed. But then I would have to do a bunch of clicks to restart it. That is less elegant than my current batch file approach.
JD Long
+4  A: 

The old SQL 2000 system tray service manager actually works with any service (just configure the service name). There is also a codeplex project for a 2005 replacement: http://www.codeplex.com/SQL2005SrvcMngr/

Remus Rusanu
I thought I was remembering that there used to be a built in tool for doing this. Cool!
JD Long
A: 

I guess I can't see what could be easier than clicking to start a batch file or clicking a button in the service manager sys tray app.

devio
+1  A: 

I would move your shortcuts into your Quicklaunch bar :)

Or you could even use a tool like launchy to easily run the shortcuts.

SkippyFire
+1  A: 

Have you thought about installing SQL Server onto a virtual machine? That way SQL Server doesn't need to be installed on your system and anytime you need it you just fire up the VM.

Cory
I had thought about that but was concerned about starting speed as well as hard drive requirements
JD Long
A: 

I have actually written my own system tray app that reads a folder for short cuts or batch files. It gives me very quick access to my scripts.

You could also create a start menu option and/or use something like Launchy to quickly run you scripts.

bdwakefield
launchy makes sense. You and skippyfire both recommended that. I'll have to check it out
JD Long
+1  A: 

Thanks to the prompting from some of the answered here, the best I have found is Windows Service Manager Tray because it also allows me to start and stop other services, not just SQL Server. it lives in the tray and is easy to config/use.

Thanks Remus Rusanu for pointing me toward the idea of a general service manager. I had been thinking only about something SQL Server specific.

JD Long