Problem with SQL Server on docker with Latin1_General_BIN2 collation

Gozdzielewski, Slawomir 1 Reputation point
2021-07-07T09:28:11.067+00:00

I have problem with executing sp_executesql procedure on SQL Server docker version if I set up collation to Latin1_General_BIN2.
Trying to execute exec sp_executesql 'select 1' I get error:
Msg 17750, Level 16, State 0, Procedure sp_executesql, Line 1 [Batch Start Line 0]
Could not load the DLL (server internal), or one of the DLLs it references. Reason: 126(The specified module could not be found.).

Host OS: Ubuntu 16.04
Docker version: 19.03.6
SQL Server image: mcr.microsoft.com/mssql/server:2019-latest 356de8c1fd95

I had the same issue on 2017 sql server images.

SQL Server Other
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2021-07-07T22:26:30.3+00:00

    I was able to reproduce this on Ubuntu 20.04. This have to be construed as a bug in the product. If this is a blocking issue for you and you need a fix, you will have to open a support case.

    If you only want let Microsoft know, the place to report it is https://feedback.azure.com/forums/908035-sql-server.

    0 comments No comments

  2. CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
    2021-07-08T03:05:14.803+00:00

    Hi @Gozdzielewski, Slawomir ,

    If you want to open a case for this issue, please go to this link https://support.microsoft.com/en-us/assistedsupportproducts

    0 comments No comments

  3. Gozdzielewski, Slawomir 1 Reputation point
    2021-07-08T07:26:42.143+00:00

    Thank you for the answer. We will open a case.


  4. Gozdzielewski, Slawomir 1 Reputation point
    2021-09-23T05:27:36.117+00:00

    I'm back with info.
    We have opened the case, the outcome is that to have this collation (and some other with similar problem) you have to restart docker container after you create it.

    docker run -e ACCEPT_EULA=Y -e SA_PASSWORD="Password1" -e MSSQL_AGENT_ENABLED="True" -e MSSQL_COLLATION="Latin1_General_BIN2" -p 41433:1433 --hostname sqltest --name sql9 -d mcr.microsoft.com/mssql/server:2019-latest

    docker restart -t 60 sqltest

    After restart everything works fine.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.