MSSQL on Debian 11 bullseye | some hints

Server:

apt-get update
apt-get -y install gnupg2 curl sudo
wget -O- https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft-archive-keyring.asc
curl https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list | tee /etc/apt/sources.list.d/mssql-server-2019.list
apt-get update
apt-get install -y mssql-server
apt-get -y install mssql-server-fts
/opt/mssql/bin/mssql-conf set sqlagent.enabled true
/opt/mssql/bin/mssql-conf set-sa-password

Client:

curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
apt-get update
apt-get -y install mssql-tools unixodbc-dev
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.profile
source ~/.profile

Your tools:

sqlcmd
bcp
mssql-cli
mssql-conf
mssql-scripter
sqlpackage

You tune your settings using the /opt/mssql/bin/mssql-conf command. The changes are written to /var/opt/mssql/mssql.conf. You can tune this file manually.

Start:

systemctl start  mssql-server

Process:

/opt/mssql/bin/sqlservr

User and Group:

mssql:mssql

Logging:

sqlagent.errorfile is not supported, you can’t change log files location.

 /opt/mssql/bin/mssql-conf set sqlagent.errorfile /var/log/somewhere

returns ‘not supported’. The log files are written to /var/opt/mssql/log

Advertisement

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.