This blog has been moved to: http://sqlblog.com/blogs/jorg_klein/
This blog post has been moved to: http://sqlblog.com/blogs/jorg_klein/archive/2009/01/06/start-stop-sql-server-ssis-ssas-ssrs-and-sql-server-agent-at-once-with-a-batch-file.aspx
I written about it in my blogs few months ago. One more tip that I thought about - you can execute this batch file in the end of your ETL process if you'd like. It can give a little break to the SQL Server services and anyway there's a new data to be cached.
Hi Jorg,
A small note, please make sure you stop them in the correct order (due to dependencys) and start them in reverse order.
At least don't start the Agent before the Server is started.
Starting would be in the order:
SQL Server
SQL Server Integration
SQL Server Agent
SQL Server Reporting
SQL Server Analysis
SQL Server FullText Search
And stopping should ofcourse be in reverse order!
Hi jdiderik,
Thanks for your comment!
I agree that starting the agent before the server would be the correct logical order. But there are no dependencies that force you to start the server before the agent can be started.
In fact, if you start the agent SQL Server will be started automatically, so NET START "MsSqlServer" could be left out (I’ve included it just to post the command, it does no harm to execute a start SQL Server command when it’s already started).
Jorg
That's correct, the agent would start the server.
But it's good practice to not depend on having services started by others unless this is really needed. It's harder to track down malfunctions of services if you don't check them 1-by-1. But your right, your solution is ok for the job and we're not talking production servers. It's probably a left over from my SysOp days to want to do things the structural way :-)
Pingback from Links for the week of 2009-01-09 | facility9