none
Language of SQL RRS feed

  • Question

  • We have an application that uses and communicates with an English version of a sql server. We now have an issue with a customer that would like to use their German version of the sql server together with our application. This gives us issues installing the application and generally running the application when it needs to write to the German sql server due to the collation differences between English and German.

    We could re code all scripts to support it, but it would be a huge task

    https://docs.microsoft.com/en-us/sql/relational-databases/collations/write-international-transact-sql-statements?view=sql-server-2017

    So the question is whether there is a simpler way of configuring the German Sql server version to understand “English” without changing all of our scripts?

    Wednesday, July 3, 2019 5:18 AM

Answers

  • There are two issues you will face.

    1) English error messages going back to your client. Please see the images to see what I am referring to.

    2) losing characters when storing them in the char/varchar/text data types. I checked with all German characters and the can be represented by the ascii character set, so you should not have a problem, but you may get a unicode character which is not represented by the ascii character set and you will lose this character.  Best practice is to use ntext (deprecated)/nchar/nvarchar.

    Client message in English.

    German Error message:

    These are coming from Visual Studio, but they could be display by your WinForm, or web client.

    Cathy Ji raises a very valid point. I can set default language by login. By changing the default server language all new logins will get error messages displayed in the new language setting. You will need to set the default language for existing logins manually as displayed below.

    Thursday, July 4, 2019 9:57 AM

All replies

  • >>So the question is whether there is a simpler way of configuring the German Sql server version to understand >>>“English” without changing all of our scripts?

    Yes, you can install German version and define all text fields as NVACRHAR(n) datatype 


    Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/

    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting: Large scale of database and data cleansing
    Remote DBA Services: Improves MS SQL Database Performance
    SQL Server Integration Services: Business Intelligence

    Wednesday, July 3, 2019 7:42 AM
    Moderator
  • So in this case customer that is running German SQL, will need to install a english language pack? is their any cost involved in this?
    Wednesday, July 3, 2019 11:44 AM
  • https://docs.microsoft.com/en-us/sql/ssms/install-other-languages?view=sql-server-2017

    replace the language code with ENU, resulting in the following download link: https://download.microsoft.com/download/B/8/3/B839AD7D-DDC7-4212-9643-28E148251DC1/SSMS-Setup-ENU.exe


    Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/

    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting: Large scale of database and data cleansing
    Remote DBA Services: Improves MS SQL Database Performance
    SQL Server Integration Services: Business Intelligence

    Wednesday, July 3, 2019 12:25 PM
    Moderator
  • The German version of SQL Server will just display SQL Server messages in German. The client will likely not notice. It is possible that your application might return SQL Server error messages to the client which would be in English. if this is the case you would need to change your SQL Server default language

    sp_configure 'Default Language',1031
    RECONFIGURE WITH OVERRIDE
    

    You need to change all of your table structures and code that is using text, char and varchar to ntext, nchar and nvarchar. 

    Wednesday, July 3, 2019 12:32 PM
  • Hi Rolf.Szimnau,

    Changing default language setting at SQL Server instance level doesn't affects the default language setting of the existing SQL Server logins. It is meant to be inherited only by the new user logins that you create after changing the instance level setting.
    So, there is an intermediate level between your SQL Server instance and the session which you can use to control the default language setting for session - login level.

    You can do it from SQL Server Management Studio (SSMS) UI. Security > Logins> Properties>Default Langurage

    Please refer to How to change default language for SQL Server?


    Best regards,
    Cathy Ji


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, July 4, 2019 9:01 AM
  • Thank you all, i am not sure i understand, changing the language SSMS will not solve this problem?, but if i create a new login, where default language is english, then i should not having any issues running the scripts on a german SQL server, is this how it should be understood?

    I see that Hillary wrote the following:

    You need to change all of your table structures and code that is using text, char and varchar to ntext, nchar and nvarchar. 

    I assume that this means we will have to change tables inside our database?


    Thursday, July 4, 2019 9:06 AM
  • Yep, exactly, see my reply as well

    >>>Yes, you can install German version and define all text fields as NVACRHAR(n) datatype 

    And id you have already data into the column and change it to NVARCHAR(n)  the old data  will not be change the language , I mean   you will see still ????? but new data will be added correctly


    Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/

    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting: Large scale of database and data cleansing
    Remote DBA Services: Improves MS SQL Database Performance
    SQL Server Integration Services: Business Intelligence

    Thursday, July 4, 2019 9:18 AM
    Moderator
  • Thank you Uri for your reply, and just to be 100%.

    Creating a new login in english on the server will not resolve this issue... ? -you need to change your tables to NVARCHAR(n).

    Thursday, July 4, 2019 9:32 AM
  • Correct

    Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/

    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting: Large scale of database and data cleansing
    Remote DBA Services: Improves MS SQL Database Performance
    SQL Server Integration Services: Business Intelligence

    Thursday, July 4, 2019 9:37 AM
    Moderator
  • There are two issues you will face.

    1) English error messages going back to your client. Please see the images to see what I am referring to.

    2) losing characters when storing them in the char/varchar/text data types. I checked with all German characters and the can be represented by the ascii character set, so you should not have a problem, but you may get a unicode character which is not represented by the ascii character set and you will lose this character.  Best practice is to use ntext (deprecated)/nchar/nvarchar.

    Client message in English.

    German Error message:

    These are coming from Visual Studio, but they could be display by your WinForm, or web client.

    Cathy Ji raises a very valid point. I can set default language by login. By changing the default server language all new logins will get error messages displayed in the new language setting. You will need to set the default language for existing logins manually as displayed below.

    Thursday, July 4, 2019 9:57 AM