I have a MS SQL Server 2012 instance preinstalled on a Windows 2012 R2 production server. The Windows locale was English(EN-US), and SQL Server Collation is SQL_Latin1_General_CP1_CI_AS. The system handles all Chinese data with nvarchar fields just fine.

Later for some reason (unrelated to sql server) I may have to change default system locale of the Windows 2012 R2 server to Chinese. Will this cause any undesired side effect on the SQL server instance ?

2 Answers 2


In general you should be ok. The only area that I am aware of that could be affected is SQLCLR, in which case the following conditions must be true:

  1. (
    The LCID of the OS does not match the LCID of the default Collation of the Database where the Assembly is loaded,


  2. The default Collation of the Database where the Assembly is loaded is either a binary Collation, or is any combination of the following: case-sensitive, accent-insensitive, width-sensitive, or Kana-type-sensitive


  3. custom SQLCLR code is being used

  4. SqlString is being used as an input parameter type
  5. The SqlString parameter is being concatenated inline with a string while not using either the Value property or the ToString() method (i.e. "some string" + SqlStringInputParam;)
  6. Or, possibly using Regular Expressions / Regex.

To be clear, this issue relates to the default Collation of the Database in which the Assembly is loaded, not the Instance- / Server- level Collation, nor even the Collation of any string column or any string literal or variable with a Collation set via the COLLATE keyword.

If your Database has a default Collation of SQL_Latin1_General_CP1_CI_AS because that is what the Instance-level Collation is, then neither # 1 nor # 2 above are true. And in that case, IF there is any SQLCLR code in that Database that matches items 4 - 6 above, then you wouldn't see any problem. BUT, changing the Locale of the OS would make item # 1 above true, in which case if there is any SQLCLR code that matches item 4 - 6 above, then that code will start to throw "Collation mismatch" exceptions.

Admittedly there is a fairly low probability of running into this. But, it has happened, so it's best to be aware of it.

  • Thank you. Its very informative. I did have a string aggr CLR addon, some code depend on it. I have change them to stuff, and dropped the CLR before changing over the locale. I don't seem to have any trouble so far.
    – Ben
    Nov 27, 2017 at 13:52
  • @Ben Yer welcome. To be clear, I wasn't saying that all SQLCLR was bad, or even all SQLCLR that uses SqlString is bad, just that it is something to be aware of, especially when the best practices of using the Value property or using the ToString() method were not being followed. Nov 27, 2017 at 15:03

Nothing will happen to your SQL Server installation if you change the Windows system locale, because it was installed with the specific collation SQL_Latin1_General_CP1_CI_AS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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