- Installation guidance for SQL Server on Linux
- Supported platforms
- Supported platforms
- System requirements
- Configure source repositories
- Install SQL Server
- Update or Upgrade SQL Server
- Rollback SQL Server
- Check installed SQL Server version
- Uninstall SQL Server
- Unattended install
- Offline install
- Licensing and pricing
- Optional SQL Server features
- Get help
- Editions and supported features of SQL Server 2019 on Linux
- Try SQL Server!
- SQL Server editions
- Using SQL Server with client/server applications
- SQL Server components
- Scale limits
- RDBMS high availability
- RDBMS scalability and performance
- RDBMS security
- RDBMS manageability
- Programmability
- Integration Services
- Spatial and location services
- Unsupported features & services
Installation guidance for SQL Server on Linux
Applies to: SQL Server (all supported versions) — Linux
This article provides guidance for installing, updating, and uninstalling SQL Server 2017 and SQL Server 2019 on Linux.
For other deployment scenarios, see:
This guide covers several deployment scenarios. If you are only looking for step-by-step installation instructions, jump to one of the quickstarts:
For answers to frequently asked questions, see the SQL Server on Linux FAQ.
Supported platforms
SQL Server is supported on Red Hat Enterprise Linux (RHEL), SUSE Linux Enterprise Server (SLES), and Ubuntu. It is also supported as a Docker image, which can run on Docker Engine on Linux or Docker for Windows/Mac.
Platform | Supported version(s) | Get |
---|---|---|
Red Hat Enterprise Linux | 7.7 — 7.9, 8.0 — 8.3 | Get RHEL |
SUSE Linux Enterprise Server | v12 SP3 — SP5 | Get SLES v12 |
Ubuntu | 16.04, 18.04 | Get Ubuntu 18.04 |
Docker Engine | 1.8+ | Get Docker |
Supported platforms
Platform | File System | Installation Guide | Get |
---|---|---|---|
Red Hat Enterprise Linux 7.7 — 7.9, or 8.0 — 8.3 Server | XFS or EXT4 | Installation guide | Get RHEL 8.0 |
SUSE Enterprise Linux Server v12 SP3 — SP5 | XFS or EXT4 | Installation guide | Get SLES v12 |
Ubuntu 16.04 LTS, 18.04 LTS, 20.04 LTS | XFS or EXT4 | Installation guide | Get Ubuntu 20.04 |
Docker Engine 1.8+ on Windows, Mac, or Linux | N/A | Installation guide | Get Docker |
For more information, review the system requirements for SQL Server on Linux. For the latest support policy for SQL Server 2017, see the Technical support policy for Microsoft SQL Server.
Microsoft also supports deploying and managing SQL Server containers by using OpenShift and Kubernetes.
SQL Server is tested and supported on Linux for the previously listed distributions. If you choose to install SQL Server on an unsupported operating system, please review the Support policy section of the Technical support policy for Microsoft SQL Server to understand the support implications.
System requirements
SQL Server has the following system requirements for Linux:
Requirement | |
---|---|
Memory | 2 GB |
File System | XFS or EXT4 (other file systems, such as BTRFS, are unsupported) |
Disk space | 6 GB |
Processor speed | 2 GHz |
Processor cores | 2 cores |
Processor type | x64-compatible only |
If you use Network File System (NFS) remote shares in production, note the following support requirements:
- Use NFS version 4.2 or higher. Older versions of NFS do not support required features, such as fallocate and sparse file creation, common to modern file systems.
- Locate only the /var/opt/mssql directories on the NFS mount. Other files, such as the SQL Server system binaries, are not supported.
- Ensure that NFS clients use the ‘nolock’ option when mounting the remote share.
Configure source repositories
When you install or upgrade SQL Server, you get the latest version of SQL Server from your configured Microsoft repository. The quickstarts use the Cumulative Update CU repository for SQL Server. But you can instead configure a GDR repository. For more information on repositories and how to configure them, see Configure repositories for SQL Server on Linux.
Install SQL Server
You can install SQL Server 2017 or SQL Server 2019 on Linux from the command line. For step-by-step instructions, see one of the following quickstarts:
Platform | Installation quickstarts |
---|---|
Red Hat Enterprise Linux (RHEL) | 2017 | 2019 |
SUSE Linux Enterprise Server (SLES) | 2017 | 2019 |
Ubuntu | 2017 | 2019 |
Docker | 2017 | 2019 |
You can also run SQL Server on Linux in an Azure virtual machine. For more information, see Provision a SQL VM in Azure.
After installing, consider making additional configuration changes for optimal performance. For more information, see Performance best practices and configuration guidelines for SQL Server on Linux.
Update or Upgrade SQL Server
To update the mssql-server package to the latest release, use one of the following commands based on your platform:
Platform | Package update command(s) |
---|---|
RHEL | sudo yum update mssql-server |
SLES | sudo zypper update mssql-server |
Ubuntu | sudo apt-get update sudo apt-get install mssql-server |
These commands download the newest package and replace the binaries located under /opt/mssql/ . The user generated databases and system databases are not affected by this operation.
To upgrade SQL Server, first change your configured repository to the desired version of SQL Server. Then use the same update command to upgrade your version of SQL Server. This is only possible if the upgrade path is supported between the two repositories.
Rollback SQL Server
To rollback or downgrade SQL Server to a previous release, use the following steps:
Identify the version number for the SQL Server package you want to downgrade to. For a list of package numbers, see the Release notes.
Downgrade to a previous version of SQL Server. In the following commands, replace with the SQL Server version number you identified in step one.
Platform | Package update command(s) |
---|---|
RHEL | sudo yum downgrade mssql-server- .x86_64 |
SLES | sudo zypper install —oldpackage mssql-server= |
Ubuntu | sudo apt-get install mssql-server= sudo systemctl start mssql-server |
It is only supported to downgrade to a release within the same major version, such as SQL Server 2019.
Check installed SQL Server version
To verify your current version and edition of SQL Server on Linux, use the following procedure:
If not already installed, install the SQL Server command-line tools.
Use sqlcmd to run a Transact-SQL command that displays your SQL Server version and edition.
Uninstall SQL Server
To remove the mssql-server package on Linux, use one of the following commands based on your platform:
Platform | Package removal command(s) |
---|---|
RHEL | sudo yum remove mssql-server |
SLES | sudo zypper remove mssql-server |
Ubuntu | sudo apt-get remove mssql-server |
Removing the package does not delete the generated database files. If you want to delete the database files, use the following command:
Unattended install
You can perform an unattended installation in the following way:
- Follow the initial steps in the quickstarts to register the repositories and install SQL Server.
- When you run mssql-conf setup , set environment variables and use the -n (no prompt) option.
The following example configures the Developer edition of SQL Server with the MSSQL_PID environment variable. It also accepts the EULA (ACCEPT_EULA) and sets the SA user password (MSSQL_SA_PASSWORD). The -n parameter performs an unprompted installation where the configuration values are pulled from the environment variables.
You can also create a script that performs other actions. For example, you could install other SQL Server packages.
For a more detailed sample script, see the following examples:
Offline install
If your Linux machine does not have access to the online repositories used in the quick starts, you can download the package files directly. These packages are located in the Microsoft repository, https://packages.microsoft.com.
If you successfully installed with the steps in the quick starts, you do not need to download or manually install the SQL Server package(s). This section is only for the offline scenario.
Download the database engine package for your platform. Find package download links in the package details section of the Release Notes.
Move the downloaded package to your Linux machine. If you used a different machine to download the packages, one way to move the packages to your Linux machine is with the scp command.
Install the database engine package. Use one of the following commands based on your platform. Replace the package file name in this example with the exact name you downloaded.
Platform | Package install command |
---|---|
RHEL | sudo yum localinstall mssql-server_versionnumber.x86_64.rpm |
SLES | sudo zypper install mssql-server_versionnumber.x86_64.rpm |
Ubuntu | sudo dpkg -i mssql-server_versionnumber_amd64.deb |
You can also install the RPM packages (RHEL and SLES) with the rpm -ivh command, but the commands in the previous table automatically install dependencies if available from approved repositories.
Resolve missing dependencies: You might have missing dependencies at this point. If not, you can skip this step. On Ubuntu, if you have access to approved repositories containing those dependencies, the easiest solution is to use the apt-get -f install command. This command also completes the installation of SQL Server. To manually inspect dependencies, use the following commands:
Platform | List dependencies command |
---|---|
RHEL | rpm -qpR mssql-server_versionnumber.x86_64.rpm |
SLES | rpm -qpR mssql-server_versionnumber.x86_64.rpm |
Ubuntu | dpkg -I mssql-server_versionnumber_amd64.deb |
After resolving the missing dependencies, attempt to install the mssql-server package again.
Complete the SQL Server setup. Use mssql-conf to complete the SQL Server setup:
Licensing and pricing
SQL Server is licensed the same for Linux and Windows. For more information about SQL Server licensing and pricing, see How to license SQL Server.
Optional SQL Server features
After installation, you can also install or enable optional SQL Server features.
Get help
For answers to frequently asked questions, see the SQL Server on Linux FAQ.
Источник
Editions and supported features of SQL Server 2019 on Linux
Applies to: SQL Server (all supported versions) — Linux
This article provides details of features supported by the various editions of SQL Server 2019 on Linux. For editions and supported features of SQL Server on Windows, see SQL Server 2019 — Windows.
Installation requirements vary based on your application needs. The different editions of SQL Server accommodate the unique performance, runtime, and price requirements of organizations and individuals. The SQL Server components that you install also depend on your specific requirements. The following sections help you understand how to make the best choice among the editions and components available in SQL Server.
For the latest release notes and what’s new information, see the following:
For a list of SQL Server features not available on Linux, see Unsupported features and services.
Try SQL Server!
SQL Server editions
The following table describes the editions of SQL Server.
SQL Server edition | Definition |
---|---|
Enterprise | The premium offering, SQL Server Enterprise edition delivers comprehensive high-end datacenter capabilities with blazing-fast performance enabling high service levels for mission-critical workloads. |
Standard | SQL Server Standard edition delivers basic data management for departments and small organizations to run their applications and supports common development tools for on-premises and cloud — enabling effective database management with minimal IT resources. |
Web | SQL Server Web edition is a low total-cost-of-ownership option for Web hosters and Web VAPs to provide scalability, affordability, and manageability capabilities for small to large scale Web properties. |
Developer | SQL Server Developer edition lets developers build any kind of application on top of SQL Server. It includes all the functionality of Enterprise edition, but is licensed for use as a development and test system, not as a production server. SQL Server Developer is an ideal choice for people who build and test applications. |
Express edition | Express edition is the entry-level, free database and is ideal for learning and building desktop and small server data-driven applications. It is the best choice for independent software vendors, developers, and hobbyists building client applications. If you need more advanced database features, SQL Server Express can be seamlessly upgraded to other higher end versions of SQL Server. |
Using SQL Server with client/server applications
You can install just the SQL Server client components on a computer that is running client/server applications that connect directly to an instance of SQL Server. A client components installation is also a good option if you administer an instance of SQL Server on a database server, or if you plan to develop SQL Server applications.
SQL Server components
SQL Server 2019 on Linux supports the SQL Server database engine. The following table describes the features in the database engine.
Server components | Description |
---|---|
SQL Server Database Engine | SQL Server Database Engine includes the Database Engine, the core service for storing, processing, and securing data, replication, full-text search, tools for managing relational and XML data, and in database analytics integration. |
Developer, Enterprise Core, and Evaluation editions
For features supported by Developer, Enterprise Core, and Evaluation editions, see features listed for the SQL Server Enterprise edition in the following tables.
The Developer edition continues to support only one client for SQL Server Distributed Replay.
Scale limits
Feature | Enterprise | Standard | Web | Express |
---|---|---|---|---|
Maximum compute capacity used by a single instance — SQL Server Database Engine 1 | Operating system maximum | Limited to lesser of 4 sockets or 24 cores | Limited to lesser of 4 sockets or 16 cores | Limited to lesser of 1 socket or 4 cores |
Maximum compute capacity used by a single instance — Analysis Services or Reporting Services | Operating system maximum | Limited to lesser of 4 sockets or 24 cores | Limited to lesser of 4 sockets or 16 cores | Limited to lesser of 1 socket or 4 cores |
Maximum memory for buffer pool per instance of SQL Server Database Engine | Operating System Maximum | 128 GB | 64 GB | 1410 MB |
Maximum capacity for buffer pool extension per instance of SQL Server Database Engine | 32 * (max server memory configuration) | 4 * (max server memory configuration) | N/A | N/A |
Maximum memory for Columnstore segment cache per instance of SQL Server Database Engine | Unlimited memory | 32 GB | 16 GB | 352 MB |
Maximum memory-optimized data size per database in SQL Server Database Engine | Unlimited memory | 32 GB | 16 GB | 352 MB |
Maximum relational database size | 524 PB | 524 PB | 524 PB | 10 GB |
1 Enterprise edition with Server + Client Access License (CAL) based licensing (not available for new agreements) is limited to a maximum of 20 cores per SQL Server instance. There are no limits under the Core-based Server Licensing model. For more information, see Compute capacity limits by edition of SQL Server.
RDBMS high availability
Feature | Enterprise | Standard | Web | Express |
---|---|---|---|---|
Log shipping | Yes | Yes | Yes | No |
Backup compression | Yes | Yes | No | No |
Database snapshot | Yes | Yes | No | No |
Always On failover cluster instance 1 | Yes | Yes | No | No |
Always On availability groups 2 | Yes | No | No | No |
Basic availability groups 3 | No | Yes | No | No |
Minimum replica commit availability group | Yes | Yes | No | No |
Clusterless availability group | Yes | Yes | No | No |
Online page and file restore | Yes | No | No | No |
Online indexing | Yes | No | No | No |
Resumable online index rebuilds | Yes | No | No | No |
Online schema change | Yes | No | No | No |
Fast recovery | Yes | No | No | No |
Mirrored backups | Yes | No | No | No |
Hot add memory and CPU | Yes | No | No | No |
Encrypted backup | Yes | Yes | No | No |
Hybrid backup to Azure (backup to URL) | Yes | Yes | No | No |
1 On Enterprise edition, the number of nodes is the operating system maximum. On Standard edition, there is support for two nodes.
2 On Enterprise edition, provides support for up to 8 secondary replicas — including 2 synchronous secondary replicas.
3 Standard edition supports basic availability groups. A basic availability group supports two replicas, with one database. For more information about basic availability groups, see Basic Availability Groups.
RDBMS scalability and performance
Feature | Enterprise | Standard | Web | Express |
---|---|---|---|---|
Columnstore 1 | Yes | Yes | Yes | Yes |
Large object binaries in clustered columnstore indexes | Yes | Yes | Yes | Yes |
Online nonclustered columnstore index rebuild | Yes | No | No | No |
In-Memory OLTP 1 | Yes | Yes | Yes | Yes |
Persistent Main Memory | Yes | Yes | Yes | Yes |
Table and index partitioning | Yes | Yes | Yes | Yes |
Data compression | Yes | Yes | Yes | Yes |
Resource Governor | Yes | No | No | No |
Partitioned Table Parallelism | Yes | No | No | No |
NUMA Aware and Large Page Memory and Buffer Array Allocation | Yes | No | No | No |
IO Resource Governance | Yes | No | No | No |
Delayed Durability | Yes | Yes | Yes | Yes |
Automatic Tuning | Yes | No | No | No |
Batch Mode Adaptive Joins | Yes | No | No | No |
Batch Mode Memory Grant Feedback | Yes | No | No | No |
Interleaved Execution for Multi-Statement Table Valued Functions | Yes | Yes | Yes | Yes |
Bulk insert improvements | Yes | Yes | Yes | Yes |
1 In-Memory OLTP data size and Columnstore segment cache are limited to the amount of memory specified by edition in the Scale Limits section. The max degrees of parallelism is limited. The degrees of process parallelism (DOP) for an index build is limited to 2 DOP for the Standard edition and 1 DOP for the Web and Express editions. This refers to columnstore indexes created over disk-based tables and memory-optimized tables.
RDBMS security
Feature | Enterprise | Standard | Web | Express |
---|---|---|---|---|
Row-level security | Yes | Yes | Yes | Yes |
Always Encrypted | Yes | Yes | Yes | Yes |
Dynamic data masking | Yes | Yes | Yes | Yes |
Basic auditing | Yes | Yes | Yes | Yes |
Fine grained auditing | Yes | Yes | Yes | Yes |
Transparent database encryption (TDE) | Yes | Yes | No | No |
User-defined roles | Yes | Yes | Yes | Yes |
Contained databases | Yes | Yes | Yes | Yes |
Encryption for backups | Yes | Yes | No | No |
RDBMS manageability
Feature | Enterprise | Standard | Web | Express |
---|---|---|---|---|
Dedicated admin connection | Yes | Yes | Yes | Yes with trace flag |
PowerShell scripting support | Yes | Yes | Yes | Yes |
Support for data-tier application component operations — extract, deploy, upgrade, delete | Yes | Yes | Yes | Yes |
Policy automation (check on schedule and change) | Yes | Yes | Yes | No |
Performance data collector | Yes | Yes | Yes | No |
Standard performance reports | Yes | Yes | Yes | No |
Plan guides and plan freezing for plan guides | Yes | Yes | Yes | No |
Direct query of indexed views (using NOEXPAND hint) | Yes | Yes | Yes | Yes |
Automatic indexed views maintenance | Yes | Yes | Yes | No |
Distributed partitioned views | Yes | No | No | No |
Parallel indexed operations | Yes | No | No | No |
Automatic use of indexed view by query optimizer | Yes | No | No | No |
Parallel consistency check | Yes | No | No | No |
SQL Server Utility Control Point | Yes | No | No | No |
Programmability
Feature | Enterprise | Standard | Web | Express |
---|---|---|---|---|
JSON | Yes | Yes | Yes | Yes |
Query Store | Yes | Yes | Yes | Yes |
Temporal | Yes | Yes | Yes | Yes |
Native XML support | Yes | Yes | Yes | Yes |
XML indexing | Yes | Yes | Yes | Yes |
MERGE & UPSERT capabilities | Yes | Yes | Yes | Yes |
Date and Time datatypes | Yes | Yes | Yes | Yes |
Internationalization support | Yes | Yes | Yes | Yes |
Full-text and semantic search | Yes | Yes | Yes | Yes |
Specification of language in query | Yes | Yes | Yes | Yes |
Service Broker (messaging) | Yes | Yes | No (Client only) | No (Client only) |
Transact-SQL endpoints | Yes | Yes | Yes | No |
Graph | Yes | Yes | Yes | Yes |
1 Scale out with multiple compute nodes requires a head node.
Integration Services
For info about the Integration Services (SSIS) features supported by the editions of SQL Server, see Integration Services features supported by the editions of SQL Server.
Spatial and location services
Feature Name | Enterprise | Standard | Web | Express |
---|---|---|---|---|
Spatial indexes | Yes | Yes | Yes | Yes |
Planar and geodetic datatypes | Yes | Yes | Yes | Yes |
Advanced spatial libraries | Yes | Yes | Yes | Yes |
Import/export of industry-standard spatial data formats | Yes | Yes | Yes | Yes |
Unsupported features & services
The following features and services are not available for SQL Server 2019 on Linux. The support of these features will be increasingly enabled over time.
Area | Unsupported feature or service |
---|---|
Database engine | Merge replication |
В | Stretch DB |
В | Distributed query with 3rd-party connections |
В | Linked Servers to data sources other than SQL Server |
В | System extended stored procedures (XP_CMDSHELL, etc.) |
В | Filetable, FILESTREAM |
В | CLR assemblies with the EXTERNAL_ACCESS or UNSAFE permission set |
В | Buffer Pool Extension |
В | Backup to URL — page blob 2 |
SQL Server Agent | Subsystems: CmdExec, PowerShell, Queue Reader, SSIS, SSAS, SSRS |
В | Alerts |
В | Managed Backup |
High Availability | Database mirroring |
Security | Extensible Key Management (EKM) |
В | AD Authentication for Linked Servers |
В | AD Authentication for Availability Group (AG) Endpoints |
Services | SQL Server Browser |
В | SQL Server R services 1 |
В | StreamInsight |
В | Analysis Services |
В | Reporting Services |
В | Data Quality Services |
В | Master Data Services |
1 SQL Server R is supported within SQL Server, but SQL Server R services as a separate package is not supported.
2 Backup to URL is supported for block blobs, using the Shared Access Signature.
Источник