Avatar of Carlos_Felipe
Carlos_FelipeFlag for Brazil

asked on 

Is it necessary to stop SQL services before reboot the server?

Is it really needed to STOP SQL Service before reboot the server?

Based on the the value in the registry key
HKLM\SYSTEM\CurrentControlSet\Control\WaitToKillServiceTimeout, the server
can kill the process if it takes too long to stop. I think it's not a good,
right?

Thx,

Felipe
Microsoft SQL ServerMicrosoft SQL Server 2008Microsoft SQL Server 2005

Avatar of undefined
Last Comment
Mark Wills
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

>Is it really needed to STOP SQL Service before reboot the server?
no.
Avatar of Carlos_Felipe
Carlos_Felipe
Flag of Brazil image

ASKER

If the SQL service does not stop before the timeout value, the operating system will kill the process. What happens with the transactions running at that moment?
all transactions running at that moment will be rolled back.
you should indeed ensure that there are no critical transactions ongoing, resp tell all end-users about the reboot.
Avatar of Mark Wills
Mark Wills
Flag of Australia image

In an ideal world, you would take the time to do an orderly shutdown os SQL Server - it does a checkpoint at that time.

In the real world, then the reboot is often performed before shutting down. 99% of the time, it won't matter. If it is a planned shutdown, then chances are the users aren't logged on (or shouldn't be). The reboot process does shut down services anyway...
Avatar of Carlos_Felipe
Carlos_Felipe
Flag of Brazil image

ASKER

I'll give you an example of a scenario:

I shut my server down.
The server shows that, during the shutdown process, SQL Server service stops responding.
So, in the background, the Operating System starts counting down, based on the value in HKLM\SYSTEM\CurrentControlSet\Control\WaitToKillServiceTimeout.
If SQL Server service does not stop timely, I assume that Windows will kill sqlserver.exe. And that could be risky.
If I stop the SQL Server service manually, WaitToKillServiceTimeout won't be used, because it's only for the shutdown process. It means that, if the service takes more time to stop (bigger than the value WaitToKillServiceTimeout), it will stop gracefully.
It's only a thought... What do you think, folks?
ASKER CERTIFIED SOLUTION
Avatar of Mark Wills
Mark Wills
Flag of Australia image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo