apt update && apt install -y curl
curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server-2022.list
apt update && apt install -y mssql-server
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openldap/libldap-2.5-0_2.5.11+dfsg-1~exp1ubuntu3_amd64.deb && dpkg -i libldap-2.5-0_2.5.11+dfsg-1~exp1ubuntu3_amd64.deb
/opt/mssql/bin/mssql-conf setup
啟用代理後重啟服務
/opt/mssql/bin/mssql-conf set sqlagent.enabled true && systemctl restart mssql-server
停止服務
systemctl stop mssql-server
設定定序
/opt/mssql/bin/mssql-conf set-collation
Chinese_Taiwan_Stroke_CI_AS:以筆劃排序,大小寫不區分 (Case Insensitive),重音符號區分 (Accent Sensitive),適合一般文字搜尋。
Chinese_Taiwan_Stroke_CS_AS:以筆劃排序,大小寫區分 (Case Sensitive),重音符號區分,適合需要區分大小寫的場景。
啟動服務
systemctl start mssql-server
curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
apt update && apt install -y mssql-tools18 unixodbc-dev
設定環境變數
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc && source ~/.bashrc
Deleting the wiki page "Database:SQLServer" cannot be undone. Continue?