Is it safe to restart sql server service?

  • I know that DB recovery happened every time we restarting service. But is it safe, can it result in data corruption or sql server takes care perfectly about everything? Every time we have hardware issues (like SAN disk with DB data file came offline) our IT manager tends to restart sql service to "fix" DB (as he says) when disk with data is back online. Is this correct way to go? There is a lot of info on web regarding "how" to restart service but not " is it safe"? It seems to me we should not restart service every time something is wrong with Sql server only because restarting solves issue but rather try to figure out what is the cause of issue? Anyhow really appreciate any thoughts. Thanks, Yuri

  • It will bring the data in a consistent state when opening a database.

    What worries me is that you state "every time we have hardware issues".

    Does that occur so often ?

    What else do you know/investigate when these issues occur ?

    Seems to me it's more like a NT4 behavior where it was generally accepted to just restart.

    Nowadays windows has matured and we actually go after the problem to tackle it and prevent new downtime as much as we can.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Yuri55 (6/25/2011)


    I know that DB recovery happened every time we restarting service. But is it safe, can it result in data corruption or sql server takes care perfectly about everything?

    Nothing SQL does will result in corruption. corruption is something mangling the data file outside of sQL.

    Every time we have hardware issues (like SAN disk with DB data file came offline) our IT manager tends to restart sql service to "fix" DB (as he says) when disk with data is back online. Is this correct way to go?

    That or offline/online. SQL won't recognise that a missing file is back unless you do.

    That said, hardware issues that happen so often that there's a standard fix is an extremely concerning scenario. Has anyone bothered to do any root-cause analysis or are you just hoping that the hardware will come back OK every time?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • What you said make sense, i.e. under no possible condition sql service reboot can result in something bad (does not matter- corruption, integrity break, etc). This is good. But probably we should not do this (service reboot) too often, therefore I am just curious regarding this case- when disk with data file is back online is service reboot the only (and best) option to let DB know data file is back? Can we use something more elegant 🙂 like restore ... recovery or something like this? As far as why we had this issue (disk is off/on line)- our IT stuff is still playing with new SAN disks)-unfortunately for production DBs). Thanks, Yuri

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply