Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-07-11 : 13:03:21
|
| Should you stop sql server before you shut down the box, or isn't it needed. I thought better safe than sorry...Since I've now been getting boxes thown my way I have to worry about this now.Any thought appreciated.Brett8-) |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-07-11 : 13:43:20
|
| You do not need to shut down SQL Server before you shutdown the server. The server will handle stopping the service. SQL Server will handle the transactions that were running at shutdown during its startup (you'll see rollforward and rollback messages in the Error Log).I would recommend that you shutdown all applications that connect to the SQL Server though.Tara |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-07-11 : 13:49:23
|
| Thanks Tara...if you don't shut down the apps, then the connections will then just be left out there hanging?Brett8-) |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-07-11 : 13:55:23
|
| The connections will be dropped obviously at shutdown. Then when SQL Server is started, SQL Server decides what to do with any transactions that didn't complete, weren't committed, etc... When I say shutdown the applications, I am referring to applications such as web sites and anything else that runs on a server. Client applications would be hard to shutdown if you have a lot of clients. I work in a web environment, so it's pretty easy to shutdown everything.Tara |
 |
|
|
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts |
Posted - 2003-07-12 : 07:46:10
|
| Whilst everything Tara has said is true, I do tend to stop the SQL Service especially if I'm restarting the server remotely (be it via TS/VNV/PCAnywhere/SMS etc) just because I don't trust the remote control software (I've seen too many hangs on shutdown etc to be 100% sure of it). Having said that SQL Server uses WAL and will recover in almost all circumstances even if you just pull the plug out. I just like that warm fuzzy feeling that SQL is in a consistent state following a clean shutdown before restarting the OS. A clean shutdown will deal with all the client connections. Having said that, I never do that on non-production boxes and have never had any issues, I just want to be 101% sure I've done everything I can to ensure the health of the server in a production environment (where hopefully you won't actually need to do this very often)HTHJasper Smith0x73656c6563742027546f6f206d7563682074696d65206f6e20796f75722068616e6473203f27 |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-07-14 : 08:53:36
|
| Thanks Jasper...I'm of the school better safe than sorry...Soemtimes they may not appear rational though...But I think I'll add it to my shut down procedures, esp since it doesn't hurt...What is MS's Recommendation though?Brett8-) |
 |
|
|
|
|
|
|
|