SQL Server on Linux - What's installed?

Software… Are you the curious type like me who needs to know what’s been installed and where it is located on your system!

Exploring the public preview of SQL Server vNext CTP1.1, and installing the following necessary packages mssql-server, mssql-tools, and msodbcsql for running and using SQL Server on Linux. This post is about these packages, finding out what files are installed and where, but before we jump in some minor housekeeping stuff…

What is a Linux package?

In Linux distributions, a package refers to a compressed file archive containing all of the files that come with a particular application. The files are usually stored in the package according to their relative installation paths on your system. Most packages also contain installation instructions for the OS, as well as a list of any other packages that are dependencies, prerequisites required for installation.

Common types of Linux packages include .deb, .rpm, and .tgz. Since Linux packages do not usually contain the dependencies necessary to install them, many Linux distributions use package managers that automatically read dependencies files and download the packages needed before proceeding with the installation. Some examples of package managers are APT, YUM, and Pacman.

What is Dpkg?

Dpkg or the Debian Package Manager is a package manager for Debian-based systems like Ubuntu, Linux Mint, and openSUSE. It can install, remove, build, and provide information about .deb packages, but unlike other package management systems, it cannot automatically download and install packages or their dependencies.

What is RPM?
RPM or the Red Hat Package Manager is a package management utility for Red Hat based systems like RHEL, CentOS and Fedora. The tool allows system administrators and users to install, update, uninstall, query, verify and manage system software packages in Unix/Linux operating systems.

Now we already know which packages we have installed for SQL Server on Linux, but if you need to confirm and list any installed package on your system you can issue the following command:

List the installed package that contains the “sql” keyword – Debian package (i.e. Ubuntu)
dpkg -l | grep sql

List the installed package that contains the “sql” keyword – RPM package (i.e. CentOS)
yum list installed | grep sql

Output on Debian distribution:

The following are the commands to execute for both Debian and RPM Linux distributions in order to list its content and identify where it was installed on your system.

mssql-server package

Debian
dpkg -L mssql-server

RPM
rpm -ql mssql-server

Output from Debian package:

/.
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/mssql-server-telemetry.service
/lib/systemd/system/mssql-server.service
/opt
/opt/mssql
/opt/mssql/lib
/opt/mssql/lib/system.sfp
/opt/mssql/lib/libsqltelemetry.so
/opt/mssql/lib/sqlservr.sfp
/opt/mssql/lib/mssql-conf
/opt/mssql/lib/mssql-conf/mssqlsettings.py
/opt/mssql/lib/mssql-conf/mssqlconfhelper.py
/opt/mssql/lib/mssql-conf/mssql-conf.py
/opt/mssql/lib/mssql-conf/collations.txt
/opt/mssql/lib/mssql-conf/mssqlsettingsmanager.py
/opt/mssql/lib/mssql-conf/set-collation.sh
/opt/mssql/lib/mssql-conf/sapassword.sh
/opt/mssql/lib/sqlpackage.sfp
/opt/mssql/lib/system.netfx.sfp
/opt/mssql/lib/system.common.sfp
/opt/mssql/lib/system.certificates.sfp
/opt/mssql/lib/libunwind.so.8
/opt/mssql/bin
/opt/mssql/bin/sqlservr
/opt/mssql/bin/mssql-conf
/opt/mssql/bin/sqlservr-telemetry
/opt/mssql/bin/sqlpackage
/opt/mssql/bin/compress-dump.sh
/opt/mssql/bin/sqlservr-setup
/opt/mssql/bin/generate-core.sh
/usr
/usr/share
/usr/share/doc
/usr/share/doc/mssql-server
/usr/share/doc/mssql-server/copyright
/usr/share/doc/mssql-server/THIRDPARTYNOTICES.TXT.gz
/usr/share/doc/mssql-server/LICENSE.TXT.gz
/usr/share/doc/mssql-server/changelog.Debian.gz
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/sqlpackage.1.gz
/usr/share/man/man1/mssql-conf.1.gz
/usr/share/man/man1/sqlservr.1.gz

mssql-tools package

Debian
dpkg -L mssql-tools

RPM
rpm -ql mssql-tools

Output from Debian package:

/.
/opt
/opt/mssql-tools
/opt/mssql-tools/share
/opt/mssql-tools/share/resources
/opt/mssql-tools/share/resources/en_US
/opt/mssql-tools/share/resources/en_US/BatchParserGrammar.llr
/opt/mssql-tools/share/resources/en_US/BatchParserGrammar.dfa
/opt/mssql-tools/share/resources/en_US/SQLCMD.rll
/opt/mssql-tools/share/resources/en_US/bcp.rll
/opt/mssql-tools/bin
/opt/mssql-tools/bin/sqlcmd-13.0.1.0
/opt/mssql-tools/bin/bcp-13.0.1.0
/usr
/usr/share
/usr/share/doc
/usr/share/doc/mssql-tools
/usr/share/doc/mssql-tools/THIRDPARTYNOTICES.txt
/usr/share/doc/mssql-tools/LICENSE.txt

msodbcsql package

Debian
dpkg -L msodbcsql

RPM
rpm -ql msodbcsql

Output from Debian package:

/.
/opt
/opt/microsoft
/opt/microsoft/msodbcsql
/opt/microsoft/msodbcsql/etc
/opt/microsoft/msodbcsql/etc/odbcinst.ini
/opt/microsoft/msodbcsql/lib64
/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.1.0
/opt/microsoft/msodbcsql/share
/opt/microsoft/msodbcsql/share/resources
/opt/microsoft/msodbcsql/share/resources/en_US
/opt/microsoft/msodbcsql/share/resources/en_US/msodbcsqlr13.rll
/opt/microsoft/msodbcsql/include
/opt/microsoft/msodbcsql/include/msodbcsql.h
/usr
/usr/share
/usr/share/doc
/usr/share/doc/msodbcsql
/usr/share/doc/msodbcsql/LICENSE.txt

Enjoy!

comments powered by Disqus