Printed 2017/08/17 07:59AM

Batch Starting SQL Server Services

By AdamJorgensen, 2010/02/27

Many times when going from demo to development to client demo, we are always starting and stopping our SQL Server services on the laptop very often. This can be a pain when you have to constantly go through the configuration manager. I have taken some common code and put into two batch files for your example. The code for the batch files will start all of your services and then there is a second file that will stop them.

The code is as follows

<Start Services File>

NET START "MsSqlServer"

NET START "SQL Server Agent (MsSqlServer)"

NET START "MsSqlServerOlapService"

NET START "ReportServer"

NET START "SQL Server Integration Services"


<Stop Services File>

NET STOP "SQL Server Agent (MsSqlServer)"

NET STOP "MsSqlServer"

NET STOP "MsSqlServerOlapService"

NET STOP "ReportServer"

NET STOP "SQL Server Integration Services"

I hope this helps streamline something in your day !

As always please post your questions to the BIDN forums.

Copyright © 2002-2017 Redgate. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.