Best practices for restart a machine hosting MS SQL Server

Visitor

Hello Everyone,

 

I need your support on the below scenario.

 

MS SQL SERVER instance is running on Windows Server 2012 R2.

Do I need to stop the ”MSSQLSERVER" service before restarting a Windows Server OS on Windows "shutdown /r" command or Windows GUI "Restart" to prevent data corruption?

 

I think the OS shutdown sequense runs "net stop SQL Server (MSSQLSERVER)" in the background and does a safe restart, is that correct?

 

Regards,

1 Reply

Generally speaking windows will wait 20 - 30 seconds for services to gracefully close. If you think more time is needed you can extend WaitToKillServiceTimeout

  

https://docs.microsoft.com/en-us/windows/win32/services/service-control-handler-function?redirectedf...

  

 (please don't forget to mark helpful replies)