script to monitor service up/down

  • I was about to start writing some script/batch file that I can schedule to generate an alert if the SQL Server service is down. Was thinking, something very simple- maybe just a batch file to run in task scheduler which does a "select @@servername" through osql, outputs to a log and sends an email if the log doesnt contain the expected result.

    surely there must already be a script out there, or perhaps some freeware/open source app? Anyone know of something like this?

  • for the sake of anyone looking for the same, I found my own answer here: http://www.databasejournal.com/features/mssql/article.php/3347241/Checking-SQL-Servers-Heart-Beat.htm

    Need to remove the extra "next" in the script for it to compile correctly. Used Blat to email the log file generated by method 1 when a search through the file finds the word "error".

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

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