SQL Server Specify Collation in Docker installation

zi8p0yeb  于 2023-05-16  发布在  Docker
关注(0)|答案(1)|浏览(236)

I've used this guide to install sqlserver on docker . However, the default collation it sets up is not the one I require. Is there a way to specify the desired collation during the installation process without having to change it afterwards? Thanks.

I don't know how to specify the collation I want: SQL_Latin1_General_Pref_CP850_CI_AS.

soat7uwm

soat7uwm1#

SQL Server in Docker and Linux can be configured using environment variables . Use MSSQL_COLLATION to specify the desired collation:

sudo docker run -e "ACCEPT_EULA=Y" \
    -e "MSSQL_SA_PASSWORD=<YourStrong@Passw0rd>"
    -e "MSSQL_COLLATION=SQL_Latin1_General_Pref_CP850_CI_AS" \
    -p 1433:1433 --name sql1 --hostname sql1 -d mcr.microsoft.com/mssql/server:2022-latest

相关问题