Saturday, 15 September 2012

Stopping/Starting SQL services en masse

So I thought I would get all the short names of the various SQL related services on my machine so I could shut them down and start them up at will. 
I have a full install of 2008 R2 and an Express instance too.

To get the short names of all the services, go here for the list:-
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services
(save that key in regedit's favorites while you're there)

This is what I found at first glance. There look to be more, like the RS web service and some other one I can't even remember. I'll have another look sometime.

SQLBrowser
SQLAgent$SQLEXPRESS
SQLServerAgent
SQLWriter
MSSQLServer
MSSQL$SQLEXPRESS
MSSQLServerOLAPService
ReportServer


One batch file to stop, another to start all of those services is called for.

PS. Those paying attention will realise that I didn't need to get the short name of the services, as you can use the full name of the service enclosed in quotes, with NET START/STOP.


fin.




About Me

Just keeping myself off the streets by playing around with stuff