Windows Service Management for Better Performance! OR Call it Memory Management

During development, its quite common to find out that SQL Server has eaten up all your RAM and other processes also keep ballooning.

I tried simplest workaround for that and it worked well. Just write a couple of batch files to stop the services. You add/remove services as per your liking. Here is an example file that I sometime use when I am working on Microsoft Project, Microsoft Visio or have to run Virtual Machine (VM) or when I am not in the “coding mode”:

File1: StopServicesToRunVM.bat

net stop "SQL Full-text Filter Daemon Launcher (MSSQLSERVER)"
net stop "SQL Server (MSSQLSERVER)"
net stop "SQL Server Agent (MSSQLSERVER)"
net stop "SQL Server Analysis Services (MSSQLSERVER)"
net stop "SQL Server Browser"
net stop "SQL Server Integration Services 10.0"
net stop "SQL Server Reporting Services (MSSQLSERVER)"
net stop "SQL Server VSS Writer"
net stop "SharePoint 2010 Administration"
net stop "SharePoint 2010 Timer"
net stop "SharePoint 2010 Tracing"
net stop "SharePoint Server Search 14"
net stop "IIS Admin Service"
net stop "World Wide Web Publishing Service"
net stop "Microsoft FTP Service"
pause

File2: StartServicesToUseSharePoint.bat

net start "SQL Full-text Filter Daemon Launcher (MSSQLSERVER)"
net start "SQL Server (MSSQLSERVER)"
net start "SQL Server Agent (MSSQLSERVER)"
net start "SQL Server Analysis Services (MSSQLSERVER)"
net start "SQL Server Browser"
net start "SQL Server Integration Services 10.0"
net start "SQL Server Reporting Services (MSSQLSERVER)"
net start "SQL Server VSS Writer"
net start "SharePoint 2010 Administration"
net start "SharePoint 2010 Timer"
net start "SharePoint 2010 Tracing"
net start "SharePoint Server Search 14"
net start "IIS Admin Service"
net start "World Wide Web Publishing Service"
net start "Microsoft FTP Service"
pause

So essentially, you write one file to stop all services and a counterpart to start them when you need to use those services.

Syntax:
net start “{SERVICE NAME}”
(You can go to “RUN > Services.msc” and copy the service name)

Comments

Popular posts from this blog

Unable to delete Shared Services Provider in SharePoint (MOSS)

The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.

Cannot add a SimpleContent column to a table containing element columns or nested relations