Preventing Non-Critical SQL Server Agent Log Alerts

If you have SQL Sentry set to Send Email for the "SQL Server Agent Log: Error" condition, you will receive alerts for any error related to the SQL Server Agent Log. Some of these errors are critical and some can safely be ignored, but by default, you will receive a notification for any of these errors since SQL Sentry is just doing it's job. You can change the Action to Log to Database instead, which will show up in the SQL Sentry Action logs, but there's a higher likelihood you may miss something important.

A better alternative is typically to disable the "SQL Server Agent Log: Error" condition, and use the "SQL Server Agent Log: Output Content Match" condition instead. This will give you very granular control over exactly which Agent Log errors will generate an email.

Here are some sample strings you can setup which will mask this particular ODBC error and several other non-critical SQL Agent errors:

If '[298] SQLServer Error' Doesn't Exist in Output Message

And If '[338] Unable to connect to MSX' Doesn't Exist in Output Message

And If '[400] Connection re-established with MSX' Doesn't Exist in Output Message

And If '[165] ODBC Error: 0, Timeout expired [SQLSTATE HYT00]' Doesn't Exist in Output Message

And If '[392] Using MAPI32.DLL' Doesn't Exist in Output Message

And If '[196] Attempting to start mail session' Doesn't Exist in Output Message

And If '[393] Waiting for SQL Server to recover databases' Doesn't Exist in Output Message

And If '[353] Mail session started' Doesn't Exist in Output Message

And If '[100] Microsoft SQLServerAgent version' Doesn't Exist in Output Message

And If '[102] SQL Server ODBC driver version' Doesn't Exist in Output Message

And If '[101] SQL Server' Doesn't Exist in Output Message

And If '[103] NetLib being used by driver' Doesn't Exist in Output Message

And If '[310]' Doesn't Exist in Output Message

And If '[339] Local computer is' Doesn't Exist in Output Message

And If '[129] SQLSERVERAGENT starting' Doesn't Exist in Output Message

And If '[235] Job' Doesn't Exist in Output Message

And If '[364] The Messenger service has not been started' Doesn't Exist in Output Message

And If '[396] An idle CPU condition has not been defined' Doesn't Exist in Output Message

And If '[260] Unable to start mail session' Doesn't Exist in Output Message

Please note that once you set this up you can probably also disable Send Email for the "SQL Server Agent Log: Warning" condition as well.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.