A quick blog post about an issue I encountered today. I tried deploying a simple SSIS project to my local SSIS catalog. No biggie. However, at the last step of the deployment I was greeted with the following .NET error:
A .NET Framework error occurred during execution user-defined routine or aggregate “deploy-project-internal”:
System.Data.SqlClient.SqlException: The locale identifier (LCID) xxxx is not supported by SQL Server
where XXXX was the locale identifier of my system (I forgot to take a screenshot obviously). The locale in question was English (Belgium), which apparently SQL Server has some serious issues with.
Anyway, I quickly changed my locale over to en-US, however the problem persisted. After a quick search, I discovered you have to set the correct locale for the account that runs the SQL Server service. You can do this in the registry if you know the SID of the account (set Locale to 00000409 and LocaleName to en-US):
Restart the SQL Server service, Visual Studio and then you can finally deploy the project to the catalog.
Sidenote: the Power BI Desktop July release also had a locale issue and it wouldn’t launch on my machine. These issues seem to be related. Microsoft is working on a fix.
EDIT: I submitted a connect item for this issue. You’re welcome to vote 🙂
I recently read the book Agile Data Warehouse Design - Collaborative Dimensional Modeling, from Whiteboard…
You can find the slides for the session Building the €100 data warehouse with the…
I was asked to do a review of the book Microsoft Power BI Performance Best…
This is a quick blog post, mainly so I have the code available if I…
Praise whatever deity you believe in, because it's finally here, a tenant switcher for Microsoft…
This book was making its rounds on social media, and the concept seems interesting enough…
View Comments
Hi Koen,
Thank you for this post. It was very helpful in identifying a similar problem with our product. For years, our product has successfully used CLR stored procedures. However, on a newly installed Windows 10 (1803) computer with SQL Server 2012 SP1, we encountered the exception: System.Data.SqlClient.SqlException: The locale identifier (LCID) xxxx is not supported by SQL Server. This caused a stored procedure to fail with a NullReferenceException.
The Windows 10 computer was installed from scratch by specifying "English (US)" as UI languange and "Dutch (Belgium)" as Format during the Windows 10 setup. Using your post we identified that the "NT Service\MSSQLSERVER" user indeed was configured with locale "en-BE", which causes the described issue. Changing the locale for that user to "en-US" or even "nl-BE" in the Windows registry fixes the issue. We could confirm in the Windows control panel's region and language settings, that the "Format" is configured as English (Belgium) "Match Windows display language (recommended)". So, somehow, Windows 10 automatically changed the format selected during Windows setup from "Dutch (Belgium)" to "English (Belgium)".
We're trying to understand the issue in more detail but couldn't, at least at the moment of writing this comment, find more information in any Microsoft documentation. For example: is this a bug in SQL Server, which is planned to be resolved? We updated SQL Server 2012 SP1 to SP2, but that didn't resolve the issue.
Did you find more information about this topic?
Thank you.
Best regards,
Raphaël
Hi Raphaël,
I don't have more information. As you mentioned, documentation is sparse on this subject. I did realize that having this locale can cause a lot of issues in SQL Server products, such as in SSIS and SSDT, but also in Power BI Desktop. I logged it as a bug at the time, but I don't think much has happened since then.
To get the SID you can use sysinternals:
psgetsid "NT SERVICE\MSSQLSERVER"
Thank you guys so much!
This was driving me crazy. To make it work I used the SysInternals tool to find the correct SID and modified the registry as above. I changed my locale from en-DK to en-US.
Thanks to all. Adding to the post of Hans, if you have a named instance then of course the account differs. In my case: psgetsid "NT Service\MSSQL$SQL2019"
Hello All from Indonesia,
I just have similar issue with new deployment of SSAS 2016.
When I try to connect to ssas with excel or SSMS, error of [The '14345' is not supported] was shown up. (14345 is code for en-ID btw).
What I do is search my user's SID then change registry entry on my local computer. Voila the problem is gone.
Im posting, in case of anyone encounter with same issue.
Thanks Koen for pointing the solution.
Hero! Many thanks it worked!
Also thanks to @Hans
Hello,
unfortunately I suffer from the same issue, but although i have completed all the steps mentioned, it wont work.
My setting is as seen here:
1. Locale - 00000409
2. LocaleName - en-US
and still not working.
any recomandations?
Hi Thomas,
as you can see from the screenshot in the blog post, that should be the correct locale.
Was this your original locale? What errors did you get and what errors do you get now?
Regards,
Koen
hello, i'm getting the same error as thomas. What should I do ?
I don't know. The steps outlines in the blog post (and in the comments) fixed the issue for other people and me. If it still doesn't work, you can try opening a support case with Microsoft.
Thanks so much!!! Switched from SQL Virtual Account running SQL Service [NT Service\MSSQLSERVER] to Local System and worked like a charm!!! Only 3 hours wasted on this instead of days!
Hello, can you tell me how to do that?