Fire alerts for errors with severity < 18

  • When I raise error
    raiserror('Test Message', 20, 1) with log 
    it works fine for severities higher than 18, alert burns and send email to specified operators.
    but when severity is smaller than 18 alerts do not burn even when using WITH LOG option.
    Can someone specify the syntax for firing alerts where severity < 18.
    Thanks

  • Are you using:
    BEGIN TRY
    ..
    END TRY
    BEGIN CATCH
    code here to send alert
    END CATCH

  • I believe for setting up Alerts by severity, lower level severity errors only generate the alert if they are configured as logged errors.  You can see that in the sys.messages table
    SELECT * FROM sys.messages m WHERE m.language_id = 1033 AND severity < 19 AND is_event_logged = 1
    Some common ones I setup are message_id:
    823, 824, 825, 1101, 1105, 6532, 9002, 17053, 18452, 18456, 18470, 18486, 18487, 18488

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

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