Call Savance Workplace Call Us: (248) 478-2555

Support Suite

User Login



 

Main

Knowledgebase
Configure SQL Server to send notification upon failure
Posted by Sam Gaid on 06 June 2017 01:23 PM

Sometimes SQL server service tends to stop or fail due to many factors, such as Operating system issues, HardDisk issues, or simple issues such as a service account password change without updating on the server where the SQL server instance is installed. To get your SQL Server to restart automatically, follow the below steps:


  1. First, We will need to install a software which will send you a notification email upon service failure. Go to Blat.net and install blat (put your windows version in consideration - 32-64 bit)

  2. Configure Blat with the required SMTP credentials from command line (help with that is available on blat.net website as well as the downloaded file.)

  3. From your start menu, open Services.msc as an administrator.

  4. A New window will appear with the list of running services, scroll to “SQL SERVER (your instance name)”

  5. Right click on that service and and click “Properties”, a new pop up window will appear

  6. Click on the “Recovery Tab”

  7. Make sure that “Reset fail count after” is set to 1 days, and “Restart service after” is set to 1 minute. Leave “Enable actions for stops with errors” unchecked.

  8. Change “First Failure” and “Second Failure” to “Restart the Service”

  9. Change “Subsequent Failures” to  “Run a Program”.

  10. In the “Run Program” section in the same tab below, point to your blat installation

  11. In the command line parameters, type: -to <your email address without these qoutes> -subject “SQL Failure” -body “Your SQL Server failed after multiple restarts, please check your server, settings, disk space, or any other factor that is causing SQL Service to fail.”

  12. Leave “Append fail count to end of command line” unchecked