Log an error message/message to Event Viewer without the error number , severity and state

  • Hi ,

    I am trying to write a message to the Event Viewer by using the command

    :raiserror(@testmessage,16,1) with log

    The message does get logged but it also logs the error number,severity and state before the message.

    This stops the message to get picked up by certain monitors as they look for the first 3 words in the message.

    Is there any way to make sure that the message gets logged first, better still if I can eliminate logging of the error number , state and severity.

    Also if there is another way to log message from T-SQL that would be of great help..

  • No, not using raiserror.

    Other options ?

    - alter the monitoring software

    - write your own xp ( :sick: ) to log the message you want. :sick:

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data and code to get the best help

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

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

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