Question
- Is it safe to start & stop SQL's services using PowerShell's
Start-ServiceandStop-Servicecommands? - If not, is there a recommended way to start & stop SQL's services through automation?
Additional Info
We're in the process of creating scripts to bring down our systems cleanly before maintenance windows, then to bring them back up afterwards. By cleanly I mean it stops the application's services, then stops the database services (i.e. in dependency order), setting all to DISABLED, so that the infrastructure team can apply windows updates / perform any work, safely rebooting servers as required, before running the scripts to bring the system back up in the correct (dependency aware) order.
Our DBA mentioned that the correct way to stop services is through SQL's Configuration Manager; implying that that's different to just using services.msc (or for automation, powershell's stop-service / command line's sc \\someServer stop someService.
- The Note at the top of this article implies something similar: https://technet.microsoft.com/en-us/library/ms175516(v=sql.105).aspx
- This article points out that SQL Server Configuration Manager has some advantages for some functions: https://msdn.microsoft.com/en-us/library/ms174212.aspx
However I've not been able to find anything explicitly saying it's incorrect to start/stop services through the regular means, or what extra protection/functionality SQL Configuration Manager gives with regards to simply starting & stopping services.