Generate WindowsEventlog entry for certain severity levels

  • I like SQL Server 2012 to push severity level error messages of 11 and above in to the Windows Event log. The thought would be that I can use a tool like Splunk to then alert me of this event, at the very minimum permit review after the fact. I can setup an Alert and found plenty of examples, but Alerts don't offer to write to Windows Event logs. Any suggestions?

  • Take a look at sp_altermessage. You can set the Is_event_logged value in sys.messages with something like:

    EXEC sp_altermessage

    @message_id = NNNNN, --Your message number

    @parameter = 'WITH_LOG',

    @parameter_value = 'True'

    Sue

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

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