You would need a 3rd party app monitoring the Windows Error Log. There are many of them, including SCOM from Microsoft.
SQL mail Alert from eventlog message without sql agent help
Rajkumar Sivanpandi
1
Reputation point
Requirement:
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)
2 answers
Sort by: Most helpful
-
-
LiHong-MSFT 10,051 Reputation points
2022-03-31T07:32:38.147+00:00 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,
LiHong