SQL Service "services" recovery option

  • Good day all.  Quick question.  Has anyone, under Services > Recovery for SQL Server, set the following and does anyone have any issues or recommendations.  I personally have never set this for SQL Service (or any service) and am wondering if any issues.

     

  • It really depends.  Yours looks to be customized as the "Subsequent failures" option is set to run a program (powershell) which I am fairly confident is non-standard.

    My approach for systems outside of my failover setup has always been to restart the service twice and after that give up or fire off an email to someone (run a powershell script that I wrote that sends out an email to the DBA group for SQL server services, but can be configured to go to anyone from the command line parameters).  99% of the time I have it completely fail on subsequent failures as I will be notified by my monitoring tools.

    But the reason I say "it depends" is it depends on your requirements.  MAYBE if SQL server service fails once, you want to be alerted so you can investigate the failure prior to it starting again.  MAYBE 1 failure is ok and you want it to retry once then do something.  Maybe you want it to send an email alert with each failure then restart the service.  Maybe you want to wait 10 minutes before restarting the service.  It depends on your individual setup.

    Now, inside my failover, First failure results in nothing as my failover software will see that service stop and start the failover process.  if it attempted to restart the service, the failover software would run into trouble dis-mounting the disk as it would be in use and it MAY result in the SQL instance running on 2 servers which is 100% unacceptable in my environment.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • There is no reason to set anything there for SQL Server - if the SQL Server service fails you really don't want it attempting to restart multiple times and possibly causing more issues.

    If you are thinking about doing this...why?  Is there an issue where you find SQL Server service is not running and manually start it?  If so - then you really need to figure out what is causing the failure and fix that, instead of working around the failure.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

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

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