Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. 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

Is it possible to add a new language to SQL Server 2008 and edit SQL error messages with message_id less than 50000?

share|improve this question

migrated from Mar 13 '12 at 0:24

This question came from our site for professional and enthusiast programmers.

Messing with any system table (sys.messages is a view, but anyhow) would be a "Bad Idea". Also, note that this is not how error messages are "implemented" behind the scenes - adding a new language doesn't/wouldn't work by adding entries to sys.messages. – Christian.K Mar 12 '12 at 14:41
For exmple I want to add Persian Language and add sys.messages for error number 18456(Login failed) – Ehsan Mar 12 '12 at 14:45

I don't think it is possible or advisable to edit messages below 50000 in SQL server. You can create user defined messages for ids greater that 50000 using sp_addmessage.

Another possibility is to use RAISERROR to return dynamic messages. The message is returned as a server error message to the calling application or to an associated CATCH block of a TRY…CATCH construct.

share|improve this answer

No, system tables and DMVs cannot be edited. As I understand your needs, you need to handle the exceptions and modify the error messages in client code, for example, when you connect to database.

share|improve this answer

No. Beside the obvious issue of modifying system tables, actually sys.messages has separate issue: messages with id below 50000 do not come from a table. The built-in system error messages are ordinary application resources. To modify them you would have to modify binaries, and this would be prevented by the code signing.

share|improve this answer

Your Answer


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