Wednesday, January 04, 2006

SQL Server 2005 Services Manager

So its 2006, No more CTPs or Launches to look forward too; Instead it's back to the reality of doing projects with SQL Server 2005.

Like most developers I miss SQL Server Services Manager to start and stop SQL. Mainly because I have a laptop and I use it for everything else as well as development.

To get round this I have created two DOS batch files on my desktop for stoping and starting required SQL services. There are three main services that I have in my batch files:

  • MSSQL - The services name for SQL Server 2005,
  • MSOLAP -The services name for Analysis Services 2005,
  • ReportServer - The services name for Reporting Services.
The Syntax for starting services is NET START command. To start a default instance of SQL from the command line use the following:

NET START MSSQL

For a Named Instance use the following syntax.

NET START MSSQL$InstanceName

Strangely enough to stop Services you use the NET STOP Comand. Listed below are the two batch scripts I use to stop and start SQL Server , Analysis Services and Reporting Services on my Laptop. Feel free to save them in notepad with the .bat extention.

Start Serivces down batch script.

CDREM -----------------------------------------------------------------
REM SQL Server 2005, Analysis and Reporting Services START Script
REM -----------------------------------------------------------------
NET START MSSQL$SQL2005
NET START MSOLAP$SQL2005
NET START "IIS Admin"
NET START w3svc
NET START ReportServer$SQL2005

Stop Serivces down batch script.

CD\
REM -----------------------------------------------------------------

REM SQL Server 2005, Analysis and Reporting Services STOP script
REM -----------------------------------------------------------------
NET STOP MSSQL$SQL2005
NET STOP MSOLAP$SQL2005
NET STOP w3svc
NET STOP "IIS Admin"
NET STOP ReportServer$SQL2005

2 comments:

Chris Webb said...

Check out:
http://www.sqldbatips.com/showarticle.asp?ID=46

You're not the only one to miss Service Manager...

Myles Matheson said...

Hi Chris,

Thanks for the link. It’s definitely a great tool and a replacement for SQL Manager on my laptop.

Cheers

Myles