Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Some of the developers are using the following syntax in RaiseError:

RAISERROR('My business error message', 16, 0)

With the purpose of reusing the catch part of the try..catch block for business error too.

But I spotted several event log entries like this:

Msg # 50006, <blabla> please register the error message with sp_addmessage

There's some way to disable the creation of such events? I searched google, msdn and docs but didn't find a clue.

share|improve this question
up vote 1 down vote accepted

It means some other developers are using RAISERROR(50006, 16,1)... When the msgid syntax is used (or when the @local_variable in thesyntax is an int) the expectation is that the message was added to the local messages table. This is the normal approach for localized errors, to raiserror a msgid and add messages localized for various languages.

Whatever application/developer uses the msgid syntax, he/she is also responsible to add the message to the messages table during deployment, for the locale of the server.

share|improve this answer
HMmm... Interesting. I'll do some investigation..... And return to the SF to clarify the question. – Fabricio Araujo Feb 27 '10 at 14:46

RAISEERROR('This is just information', 10, 1)

This will tell SQL Server to raise a non fatal error.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.