Red Hat associate here, but (of course) not speaking for Red Hat. I'd also like to point out that using a subsidized clone slows development of the original which represents 90% of the innovation and value vs. Just building your own distribution.
![]() -->
APPLIES TO: SQL Server (Linux only) Azure SQL Database Azure Synapse Analytics (SQL DW) Parallel Data Warehouse
Starting with SQL Server 2017, SQL Server runs on Linux. It's the same SQL Server database engine, with many similar features and services regardless of your operating system.
SQL Server 2019 runs on Linux. It's the same SQL Server database engine, with many similar features and services regardless of your operating system. To find out more about this release, see What's new in SQL Server 2019 for Linux.
Tip
SQL Server 2019 is available! To find out what's new for Linux in the latest release, see What's new in SQL Server 2019 for Linux.
Tip
SQL Server 2019 is available! To find out what's new for Linux in the latest release, see What's new in SQL Server 2019 for Linux.
Tip
SQL Server 2019 is available! To find out what's new for Linux in the latest release, see What's new in SQL Server 2019 for Linux.
Install
To get started, install SQL Server on Linux using one of the following quickstarts:
Note
Docker itself runs on multiple platforms, which means that you can run the Docker image on Linux, Mac, and Windows.
Connect
After installation, connect to the SQL Server instance on your Linux machine. You can connect locally or remotely and with a variety of tools and drivers. The quickstarts demonstrate how to use the sqlcmd command-line tool. Other tools include the following:
Explore
SQL Server 2017 has the same underlying database engine on all supported platforms, including Linux. Therefore, many existing features and capabilities operate the same way on Linux. This area of the documentation exposes some of these features from a Linux perspective. It also calls out areas that have unique requirements on Linux.
If you are already familiar with SQL Server, review the Release notes for general guidelines and known issues for this release. Then look at what's new for SQL Server on Linux as well as what's new for SQL Server 2017 overall.
SQL Server 2019 (15.x) has the same underlying database engine on all supported platforms, including Linux. Therefore, many existing features and capabilities operate the same way on Linux. This area of the documentation exposes some of these features from a Linux perspective. It also calls out areas that have unique requirements on Linux.
If you are already familiar with SQL Server on Linux, review the Release notes for general guidelines and known issues for this release. Then look at what's new for SQL Server 2019 on Linux.
SQL Server 2017 and SQL Server 2019 (15.x) have the same underlying database engine on all supported platforms, including Linux. Therefore, many existing features and capabilities operate the same way on Linux. This area of the documentation exposes some of these features from a Linux perspective. It also calls out areas that have unique requirements on Linux.
If you are already familiar with SQL Server on Linux, review the release notes:
Then look at what's new:
Tip
For answers to frequently asked questions, see the SQL Server on Linux FAQ.
Get helpContribute to SQL documentation
Did you know that you could edit the content yourself? If you do so, not only will our documentation improve, but you'll also be credited as a contributor to the page.
-->
APPLIES TO: SQL Server (Linux only) Azure SQL Database Azure Synapse Analytics (SQL DW) Parallel Data Warehouse
In this quickstart, you install SQL Server 2017 or SQL Server 2019 on Red Hat Enterprise Linux (RHEL). You then connect with sqlcmd to create your first database and run queries.
In this quickstart, you install SQL Server 2019 on Red Hat Enterprise Linux (RHEL) 8. You then connect with sqlcmd to create your first database and run queries.
Tip
This tutorial requires user input and an internet connection. If you are interested in the unattended or offline installation procedures, see Installation guidance for SQL Server on Linux.
Prerequisites
You must have a RHEL 7.3, 7.4, 7.5, 7.6, or 8 machine with at least 2 GB of memory.
You must have a RHEL 7.3, 7.4, 7.5, or 7.6 machine with at least 2 GB of memory.
To install Red Hat Enterprise Linux on your own machine, go to https://access.redhat.com/products/red-hat-enterprise-linux/evaluation. You can also create RHEL virtual machines in Azure. See Create and Manage Linux VMs with the Azure CLI, and use
--image RHEL in the call to az vm create .
If you have previously installed a CTP or RC release of SQL Server, you must first remove the old repository before following these steps. For more information, see Configure Linux repositories for SQL Server 2017 and 2019.
For other system requirements, see System requirements for SQL Server on Linux.
Install SQL Server
To configure SQL Server on RHEL, run the following commands in a terminal to install the mssql-server package:
At this point, SQL Server is running on your RHEL machine and is ready to use!
Install SQL Server
To configure SQL Server on RHEL, run the following commands in a terminal to install the mssql-server package:
At this point, SQL Server 2019 is running on your RHEL machine and is ready to use!
Install the SQL Server command-line tools
To create a database, you need to connect with a tool that can run Transact-SQL statements on the SQL Server. The following steps install the SQL Server command-line tools: sqlcmd and bcp.
Install the SQL Server command-line tools
To create a database, you need to connect with a tool that can run Transact-SQL statements on the SQL Server. The following steps install the SQL Server command-line tools: sqlcmd and bcp.
Connect locally
The following steps use sqlcmd to locally connect to your new SQL Server instance.
Create and query data
The following sections walk you through using sqlcmd to create a new database, add data, and run a simple query.
Create a new database
The following steps create a new database named
TestDB .
Tip
To learn more about writing Transact-SQL statements and queries, see Tutorial: Writing Transact-SQL Statements.
Insert data
Next create a new table,
Inventory , and insert two new rows.
Select data
Now, run a query to return data from the
Inventory table.
Exit the sqlcmd command prompt
To end your sqlcmd session, type
QUIT :
Performance best practices
After installing SQL Server on Linux, review the best practices for configuring Linux and SQL Server to improve performance for production scenarios. For more information, see Performance best practices and configuration guidelines for SQL Server on Linux.
Cross-platform data tools
In addition to sqlcmd, you can use the following cross-platform tools to manage SQL Server:
Connecting from Windows
SQL Server tools on Windows connect to SQL Server instances on Linux in the same way they would connect to any remote SQL Server instance.
If you have a Windows machine that can connect to your Linux machine, try the same steps in this topic from a Windows command-prompt running sqlcmd. Just verify that you use the target Linux machine name or IP address rather than localhost, and make sure that TCP port 1433 is open. If you have any problems connecting from Windows, see connection troubleshooting recommendations.
For other tools that run on Windows but connect to SQL Server on Linux, see:
Other deployment scenarios
For other installation scenarios, see the following resources:
Tip
For answers to frequently asked questions, see the SQL Server on Linux FAQ.
Next steps![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |