Select a language
This week, Microsoft certified its SQL Server 2019 release for use with Red Hat Enterprise Linux 8. The new version of SQL Server adds Linux support for Replication and Change Data Capture (CDC), distributed transactions (MSDTC), machine learning (in Java, Python, and R), and data virtualization (Polybase) across structured and unstructured data sources. For RHEL 8, Red Hat worked closely with Microsoft to accelerate performance, enhance manageability, and improve security.
SQL Server has been generally available for production workloads on RHEL 7 since October. 2017. SQL Server is in production today with Red Hat customers in the energy, finance, legal, manufacturing, and retail sectors.
Bringing SQL Server 2019 to RHEL 8 involved work from both companies. Bob Ward, SQL Server Principal Architect at Microsoft said, "We have worked closely with Red Hat to improve I/O performance on XFS file systems and demonstrated a major performance boost with SQL Server on RHEL 8."
SQL Server running on RHEL 8 benefits from a number of performance enhancements including:
Updates to the mssql-tuned profile which optimized tuning for decision support workloads.
New TCP/IP stack enhancements that increase performance and provide BBR congestion control.
Multi-queue scheduling which allows storage to make the best use of the bandwidth available from modern NVME-enabled solid state devices.
Support for File system Direct Access (DAX) with SQL Server on RHEL 8 allowing for acceleration with persistent memory alongside Microsoft’s DAX-enablement in SQL Server 2019 for Linux.
Enhancements to the XFS file system which allows SQL Server to avoid flushing FUA-capable enterprise storage.
Enhanced management tools
With RHEL 8’s enhanced web console, it is now easier than ever for those new to Linux to perform complex operations without extensive administrator training. Using the web console, admins can join a Microsoft Active Directory domain, view performance statistics, inspect logs, configure networking and storage, start and stop services, manage subscriptions, and more! The command line is, of course, still available as well for those who prefer it or need to perform operations outside of what the web console offers.
Another new addition to RHEL 8 is the predictive analytics features of Red Hat Insights. Based on more than 25 years of customer support experience and learnings from over 1,000,000 support cases, Red Hat Insights strengthens SQL Server and RHEL by proactively identifying and fixing system issues with security, performance, availability, and stability. To learn more about the specific rules for Microsoft SQL Server, you can read about them here.
RHEL 8 introduces new security features in three areas. First, its new system-wide crypto policies can minimize attack vectors and keep systems in compliance. Second, it delivers new industry standard algorithms and protocols including support for openssl 1.1.1 and TLS 1.3. Finally, RHEL 8 provides session recording to support compliance and audit. This last feature is based on the tlog terminal I/O logger. You can combine these OS security controls with SQL Server’s own security features giving you more flexibility in how you address security requirements to keep deployments safe from attack.
Try SQL Server on RHEL 8
The easiest way to understand the benefits of SQL Server on RHEL 8 is to try it out. Start by installing RHEL 8, then install SQL Server. You can do this by first downloading and installing the developer edition of RHEL 8. The developer edition is a fully-functional version of Red Hat Enterprise Linux intended for non-production use. It can be installed on bare metal or in a VM. For more information on how to sign up for the Red Hat Developer program and download images see the FAQ.
Once you’ve installed RHEL 8, your next step is to install Microsoft SQL Server 2019. To start, you need to configure the system to use the Microsoft SQL Server 2019 software repository via the
sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/8/mssql-server-2019.repo
At this point you can install the mssql-server package using yum as follows:
sudo yum install -y mssql-server
Now that SQL Server is installed, you can configure it using the following commands:
sudo systemctl stop mssql-server sudo /opt/mssql/bin/mssql-conf setup
The command will prompt you for an edition to run. For evaluation purposes, I recommend the developer edition of SQL Server which is designed to allow you to build, test, and demonstrate applications in a non-production environment. See Microsoft's website for more information on the SQL Server editions that are available.
Once you’ve selected an edition, you’ll next be asked to accept Microsoft’s licensing terms. If the terms are acceptable, enter Yes at the "Do you accept the license terms?" prompt.
You’ll then be prompted to provide a password for SA, the SQL Server administrative account. Note that your password must be at least 8 characters long and contain characters from three of the following four sets: uppercase letters, lowercase letters, numbers, and symbols.
With setup out of the way, it’s time to configure access. You’ll want to configure the RHEL 8 firewall connections to allow remote access to port 1433/tcp with the commands:
sudo firewall-cmd --zone=public --add-port=1433/tcp --permanent sudo firewall-cmd --reload
At this point the install of SQL Server is complete. You can find ideas for working with SQL Server from Microsoft’s Quickstart: Install SQL Server and create a database on Red Hat.
Running SQL Server in a Container
RHEL 8 adds new Linux container tools including Buildah for building your containers, Podman for running containers, and Skopeo for sharing/finding containers. Red Hat and Microsoft are worked closely together to make it easier than ever to run SQL Server in a Linux container on RHEL 8 or Red Hat OpenShift, and with SQL Server 2019, you can now do just this in 3 easy steps -
First, we create a persistent storage directory where we can keep our SQL data. For this example, I’ll just use a
sudo mkdir /var/mssql sudo chmod 755 /var/mssql
Now we pull the SQL 2019 container down from the Microsoft Container Repository with:
sudo podman pull mcr.microsoft.com/mssql/rhel/server:2019-latest
Finally, we configure SQL. In this case, we’ll set the SA account password for a database named
sql1 running on ports 1401 through 1433.
podman run -e 'ACCEPT_EULA=Y' -e \ 'MSSQL_SA_PASSWORD=<YourStrong!Passw0rd>' \ —name 'sql1' -p 1401:1433 -v /var/mssql:/var/opt/mssql:Z -d \ mcr.microsoft.com/mssql/rhel/server:2019-CTP2.2
To learn more about podman and containers in Red Hat Enterprise Linux 8 see the documentation here.
Whether you’re running on bare metal, in a VM, or in a container environment, Microsoft SQL Server on Red Hat Enterprise Linux together offers a scalable foundation that provides a consistent application experience for the growing operational and analytical use-cases.
This post announces the availability of SQL Server 2019 on RHEL 8, but the best way to get to know the technology is to follow the steps above and try it out yourself.
You can learn more about SQL Server on RHEL 8 here.