As you certainly know Microsoft announced yesterday the first preview of SQL Server vNext on Linux. Obviously we are far from a final version suitable for production and the list of unsupported features will probably be good indicator of the production maturity over the time.
So as many people, I could not wait to do a try of installing SQL Server on Linux version. The installation process is well documented and I would like to share my first experiences about the installation process.
Firstly, it was a good memory to re-install a Linux server on my lab environment and I have to admit I lost some habits. But keep motivating and I’m sure my reflexes will get back with time. Well, I decided to start my Linux story by installing the SQL Server vNext on the top of a Red Hat Linux 7.2.
For this first attempt, I decided to use a lot of default configurations but for sure it will change in the future. But for the moment it doesn’t matter, I just wanted to focus on the installation process of SQL Server.
I used my existing lab environment that includes Hyper-V on Windows 8.1. I decided not to install the Linux Integration Services for Hyper-V because it seems not to be certified for REHL 7 versions. The installed virtual machines have the corresponding specifications:
–> 4 VCPUS
–> 4GB of memory
–> 50GB of disk space for the root file system but it seems to be too much … at least for the moment 🙂
So according to the Microsoft documentation the first step consists in using the Red Hat package manager YUM to download and install the SQL Server packages after adding the Microsoft SQL Server Red Hat repository file into the /etc/yum.repos.d folder.
Then after running the SQL Server configuration script (/opt/mssql/bin/sqlservr-setup) I faced my first error. Well, more memory to add in order to run SQL Server. Let’s do it!
After fixing this issue I may ran the installation process successfully in interactive mode. The installation process created two symbol links that will be managed by systemd and related to the SQL Server Service engine and telemetry (the latter has appeared since SQL Server 2016). We will have the opportunity to discuss further when we will go into more details in this area.
The second step consists in installing the client tools which include both sqlcmd and bcp. This step is pretty similar to the previous one because we have first to download the corresponding Microsoft SQL Server Red Hat repository file before installing the client tools. After downloading their packages, I faced a dependency issue as shown below – A kind of issue I almost forgot when I left the Linux World a couple of years ago 🙂 – This is a good opportunity to notice that we will use ODBC on linux to connect to SQL Server.
Well, let’s install the related missing library libtltdl.so.7()(64bit). I took a look at the internet and I downloaded the libtool-ltdl-184.108.40.206-e17_2.x86_65 rpm package that includes it. After installing the aforementioned package no issue to continue to install the SQL Server client Tools.
Let’s perform a last check to figure out which port my SQL Server instance is listening
TCP 1433 as expected !
And finally let’s connect to my SQL Server instance test via SQLCMD tool and let’s perform my first query:
The final test is not new and you already saw this picture directly from Microsoft events, webcasts and so on .. However, it was a good immersion in Linux world with SQL Server and the next time we will try to do more. There are still a lot of pending questions which I have to answer in a near future 🙂
By David Barbarin