Home Dashboard Directory Help
Search

Msg vs Message - SQL Server error message by CBatWork


Status: 

Active


6
0
Sign in
to vote
Type: Suggestion
ID: 568091
Opened: 6/16/2010 10:24:43 AM
Access Restriction: Public
0
Workaround(s)
view

Description

We recently noticed that installing the french version of SQL Server client results in having this kind of SQL error message (regardless of the settings on the server side):

Message 208, niveau 16, état 1, ..., ligne 1

We were used to see the following errro message instead :

Msg 208, level 16, state 1, ... , line 1

Is there a translation for every langage?

If we develop an internationnal software we don't want to search for every possible combination to find an error. There sould be a single string to search for regardless of the langage used.

With Oracle we only have to search for the string "ORA-xxxx" to find errors.
Details
Sign in to post a comment.
Posted by Microsoft on 1/18/2013 at 10:23 AM
Thanks for your feedback. We are not able to address this in the current release. We will consider it for the next major release.
Posted by CBatWork on 7/19/2012 at 9:00 AM
Hi Sudarshan,

Having read your post, I don't think you understand the real need. So I reiterate it here :

------------------------------------------------------------------------------------------
If we develop an internationnal software we don't want to search for every possible combination to find an error. There sould be a single string to search for regardless of the langage used.

With Oracle we only have to search for the string "ORA-xxxx" to find errors.
------------------------------------------------------------------------------------------

Always having "MSG" to notify an error, regardless of the configuration and langage id, would be great. In fact it would be the same behavior as Oracle uses for years (ORA-).

Best regards.

Carl

Posted by Microsoft on 7/18/2012 at 12:56 PM
Thanks for your feedback. We are looking at this suggestion and the feasibility.
Posted by Sudarshan Narasimhan [MSFT] on 3/11/2011 at 9:15 AM
@All,

Having drilled into this behavior, here are the results

Language Name    Language ID (LCID)    Message String    Sample Output in SQLCMD
Chinese (Traditional)    1028    訊息    訊息 208, 層級 16, 狀態 1
Chinese (Simplified)    2052    消息    消息 208,级别 16,状态 1
English    1033    Msg    Msg 208, Level 16, State 1
French    1036    Message    Message 208, niveau 16, état 1
German    1031    Meldung    Meldung 208, Ebene 16, Status 1
Italian    1040    Messaggio    Messaggio 208, livello 16, stato 1
Japanese    1041    メッセージ    メッセージ 208、レベル 16、状態 1
Korean    1042    메시지    메시지 208, 수준 16, 상태 1
Portuguese (Brazil)    1046    Mensagem    Mensagem 208, Nível 16, Estado 1
Russian    1049    Сообщение    Сообщение 208, уровень 16, состояние 1
Spanish    3082    Mensaje    Mensaje 208, Nivel 16, Estado 1

There are at least 11 languages in which the SQL Client (SQLCMD.exe) is available and the message string is local to each language. Every language expect English (1033) is consistent with the message string "Message". Only English reports "MSG" instead of "Message".

When the Operating System Language and the Client Locale are the same, then the string is displayed for that language. For all the other combinations, the string displayed is the default one for English i.e. “Msg”. This is the reason why 1033 is always available as it serves as a fallback and displays “Msg”.

E.g. If the OS language is Spanish and client is English, then you will get the message as “MSG”
E.g. If the OS language is Spanish and client is Spanish, then you will get the message as “Mensaje”.

This is a localization issue only for English and I believe has been the same since SQL 6.5 (maybe even Sybase days). Changing this behavior is going to be tricky, since backward-compatibility has to be maintained. Considering the time "Msg" has been with SQL Server, not sure if that is feasible as might break other apps/logic which are designed to parse/read "Msg".

To answer your question, every language expect English has a translation of the string "Message", so you can factor that in. Only for English you need to consider the string "Msg".
Posted by CBatWork on 2/21/2011 at 7:12 AM
I reiterate, can someone at Microsoft get involved with this issue?
Posted by CBatWork on 7/2/2010 at 10:18 AM
Can someone at Microsoft get involved with this issue (bad implementation)?
Posted by tlq89 on 6/17/2010 at 9:08 AM
anyone has a workaround for it ?
Posted by Mark__T on 6/17/2010 at 9:07 AM
I agree, this has to be standardized.
Posted by daveadfadfadf on 6/16/2010 at 12:54 PM
I couldn't agree more. Our database installation and CIT processes search our logs for "Msg " to determine if there are any errors. We even have our developers trained to code all error handling to start with "Msg ". This is really a pain. In fact, it would even be nice if the drivers could start their error messages with "Msg " (although I realize that would be a massive undertaking). For instance, in our logs "Msg " will show us any database errors, but what if the server crashed midway through or a login failed? In those cases we have to search for "[SQL Native Client]", "Login failed", "[DBMSLPCN]", etc etc. ORA-xxxx - style messages would be *very* helpful.

--dave wentzel
Sign in to post a workaround.