Organizations that embraced the option to run Microsoft SQL Server 2017 on Linux have been looking forward to the release of SQL Server 2019. Regardless of which operating system (OS) you choose, it’s the same SQL Server database code, and includes even more of the same features and services as the Windows release. This introductory blog post about running Microsoft SQL Server 2019 on Linux provides basic information database professionals need to know before upgrading or migrating SQL Server onto Linux.
Supported Linux platforms
Microsoft SQL Server 2019 is tested and supported to run on several Linux distribution platforms:
- Red Hat Enterprise Linux (RHEL)
- SUSE Linux Enterprise Server (SLES)
Along with the above versions of Linux distributions, SQL Server 2019 is supported in a container scenario using a Docker image. Running a SQL Server database inside a Docker engine with Linux offers more flexibility, faster recovery, and quicker deployments, including deployments into the Azure cloud. For those becoming familiar with Linux, Docker for Windows or Mac gives you the option to run a Docker engine on your workstation with SQL Server 2019 on Linux.
Along with Docker technology, orchestration can be achieved, both managing and deploying SQL Server containers on Linux using Red Hat Open shift or Kubernetes. This includes SQL Server 2019 Big Data Clusters (BDC), fully scalable clusters with SQL Server, Spark, and Hadoop File System (HDFS). BDCs provide the ability to read, write, and analyze big data with T-SQL or Spark, and you can combine big data and relational data, too.
While this post has focused on RHEL, SLES, Ubuntu, and container options for Linux, you may have questions regarding other Linux distributions that may be able to run SQL Server 2019, but they’re not supported by Microsoft. Always consider the database server’s use before deciding to run SQL Server 2019 on an unsupported operating system and refer to Microsoft’s support policy on the topic.
Tools for Microsoft SQL Server 2019 running on Linux
With the release of SQL Server 2019, there are more tools that database professionals can use with SQL Server 2019 running on Linux:
- Windows-based tools—You can use any existing tools that run on Windows to access SQL Server on Linux. This includes SQL Server Management Studio (SSMS), SQL Server Data Tools (SSDT), operational support systems, and third-party tools.
- Activity Monitor—Use SSMS on Windows to connect remotely and use tools/features such as Activity Monitor commands on a Linux host.
- Azure Data Studio—Use this cross-platform database tool to manage the Microsoft family of on-premises and cloud data platforms on Windows, MacOS, and Linux. That includes SQL Server 2019 running on Linux. You can also create SQL Server Notebooks in Azure Data Studio, multiple team members to collaborate on projects.
- Dynamic Management Views (DMVs)—System DMVs collect different types of information about SQL Server, including Linux process information. Use server state information in conjunction with dynamic management functions (DMFs) to monitor the health of a server instance, diagnose problems, and tune performance.
- Query Store—Use Query Store for insights on query plan choice and performance. It simplifies performance troubleshooting by helping database professionals quickly find performance differences caused by query plan changes.
- Performance Dashboard—The Performance Dashboard helps you determine if there’s a performance bottleneck on the connected SQL Server instance and provides diagnostic data to help you resolve the problem.
- mssql-conf is a configuration script that installs with SQL Server 2019 for Linux.
Command Line Tools for Microsoft SQL Server 2019 on Linux
- sqlcmd and Bulk Copy Protocol (BCP)—These command-line tools are natively available on Linux. sqlcmd is a command-line query utility, and BCP is a bulk import-export utility.
- mssql-scripter—This command-line tool on Linux generates T-SQL scripts for a SQL database running anywhere.
- mssql-cli—This new, interactive command-line tool written in Python offers several enhancements over sqlcmd in the Terminal environment.
With these tools and command line tools, you’re now ready to run Microsoft SQL Server 2019 on Linux. To learn more about what you can do with Microsoft SQL Server 2019, check out the free Packt guide Introducing Microsoft SQL 19. If you’re ready to jump to a fully managed cloud solution, check out the Essential Guide to Data in the Cloud.