SQL mail Alert from eventlog message without sql agent help

Rajkumar Sivanpandi 1 Reputation point


    1. Suppose SQL agent get stopped in middle, how to send mail alert

    2. Suppose TempDB got full. In that situation mail will be triggered based on reading event log message (not by sql agent job)  
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,454 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tom Phillips 17,686 Reputation points

    You would need a 3rd party app monitoring the Windows Error Log. There are many of them, including SCOM from Microsoft.

  2. LiHong-MSFT 10,031 Reputation points

    Hi @Rajkumar Sivanpandi
    It seams you can run a Powershell script which will send an email and terminate (to avoid spam) if the SQL agent fails for any reason. Start the task again after restarting SQL Server to continue monitoring.
    And here are some similar threads that you can refer to:
    Send email alert when SQL Server Agent stops/fails
    How to notify through DB MAIL when sql server agent stopped automatically?

    Best regards,

    0 comments No comments