SQL SERVER Start and Stop services Using SSIS

Case
Constantly running all Microsoft SQL Services on your development desktop/laptop could be a little too much. Especially when you're not developing, but starting and stopping via the control panel is tiresome...

Solution
You can stop/start a service via the command (or even better, put it in a batchfile):

Syntax
      NET START [service]
      NET STOP [service]
      NET PAUSE [service]
      NET CONTINUE [service] 
   
Key
   service : The service name as shown in Control Panel, Services
 
 

Stop batchfile SQL 2008:

@ECHO OFF
NET STOP "SQL Server Agent (MSSQLSERVER)"
NET STOP "SQL Server Integration Services"
NET STOP "SQL Server Analysis Services (MSSQLSERVER)"
NET STOP "SQL Server Reporting Services (MSSQLSERVER)"
NET STOP "SQL Server (MSSQLSERVER)"
 
Save Above Text As STOP.cmd 
 
Start batchfile SQL 2008:
@ECHO OFF
NET START "SQL Server (MSSQLSERVER)" 
NET START "SQL Server Agent (MSSQLSERVER)"
NET START "SQL Server Integration Services"
NET START "SQL Server Analysis Services (MSSQLSERVER)"
NET START "SQL Server Reporting Services (MSSQLSERVER)"
 
Save Above Text As START.cmd 

0 comments:

Post a Comment

Your Location