Skip to content

Instantly share code, notes, and snippets.

@devpro
Last active March 4, 2022 09:48
Show Gist options
  • Save devpro/fb22c16c656675cfca1c96ae9afbf240 to your computer and use it in GitHub Desktop.
Save devpro/fb22c16c656675cfca1c96ae9afbf240 to your computer and use it in GitHub Desktop.

Install SQL Server tools on Debian 11

This is the procedure to be able to use SQL Server tools on a Debian 11 system. It worked on March 04, 2022.

Steps

  • Run a container
docker run --rm --name dotnetsdk -it mcr.microsoft.com/dotnet/sdk:6.0 bash
  • Install SQL Server tools steps (docs)
apt-get update
apt-get install -y gnupg
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | tee /etc/apt/sources.list.d/msprod.list
# not needed anymore but fixed a temporary issue (https://askubuntu.com/questions/13065/how-do-i-fix-the-gpg-error-no-pubkey)
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EB3E94ADBE1229CF
apt-get update
apt-get install -y mssql-tools unixodbc-dev
/opt/mssql-tools/bin/sqlcmd -?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment