| title | Install PolyBase on Linux | ||
|---|---|---|---|
| titleSuffix | SQL Server | ||
| description | Learn how to install SQL Server PolyBase on Linux. PolyBase enables you to run external queries against remote data sources. | ||
| author | MikeRayMSFT | ||
| ms.author | mikeray | ||
| ms.reviewer | dakryze, hudequei, randolphwest | ||
| ms.date | 04/27/2026 | ||
| ms.service | sql | ||
| ms.subservice | linux | ||
| ms.topic | install-set-up-deploy | ||
| ms.custom |
|
||
| monikerRange | >=sql-server-linux-ver15 || >=sql-server-ver15 |
[!INCLUDE sqlserver2019-linux]
The following steps install PolyBase (mssql-server-polybase and mssql-server-polybase-hadoop) on Linux. With PolyBase, you can run external queries against remote data sources.
Before you install PolyBase, first install SQL Server. This step configures the keys and repositories that you use when installing the mssql-server-polybase and mssql-server-polybase-hadoop packages.
Applies to: [!INCLUDE sssql25-md]
In [!INCLUDE sssql25-md] and later versions, PolyBase supports ODBC data sources on Linux. ODBC data source support for Linux requires the .NET runtime, which is automatically downloaded and installed during PolyBase setup. Internet access is required during the installation.
The hostname where [!INCLUDE ssnoversion-md] is installed has a maximum length of 15 characters.
PolyBase isn't supported on [!INCLUDE sssql17-md] for Linux.
Scale-out for PolyBase on Linux isn't currently available.
Hadoop isn't supported on [!INCLUDE sssql22-md] and later versions.
Install PolyBase for your operating system:
- Red Hat Enterprise Linux (RHEL)
- Ubuntu
- SUSE Linux Enterprise Server (SLES)
Applies to: [!INCLUDE sssql19-md] and later versions.
-
Download the Microsoft Red Hat repository configuration file.
For RHEL 10:
sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/10/prod.repoFor RHEL 9:
sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/9/prod.repoFor RHEL 8:
sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/8/prod.repoFor RHEL 7:
sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/7/prod.repo -
Use the following command to install the
mssql-server-polybaseon Red Hat Enterprise Linux:sudo yum install -y mssql-server-polybase -
Restart the [!INCLUDE ssnoversion-md] instance when prompted:
sudo systemctl restart mssql-server
Note
After installation, enable the PolyBase feature.
::: moniker range="<=sql-server-linux-ver15 || <=sql-server-ver15"
Applies to: [!INCLUDE sssql19-md] only.
-
Use the following command to install the
mssql-server-polybase-hadooppackage:sudo yum install -y mssql-server-polybase-hadoopThe PolyBase Hadoop package depends on the following packages:
mssql-servermssql-server-polybasemssql-server-extensibilitymssql-zulu-jre-11
-
Restart
launchpaddwhen prompted:sudo systemctl restart mssql-launchpadd
Note
After installation, you must set the Hadoop connectivity level.
If you need an offline installation, find the PolyBase package download in the Release notes for SQL Server 2019 on Linux. Then use the same offline installation steps described in the article Install SQL Server.
::: moniker-end
Applies to: [!INCLUDE sssql19-md] and later versions.
-
Register the Microsoft Ubuntu repository.
For Ubuntu 16.04:
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.listFor Ubuntu 18.04:
curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.listFor Ubuntu 20.04:
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.listFor Ubuntu 22.04:
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.listFor Ubuntu 24.04:
curl https://packages.microsoft.com/config/ubuntu/24.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list -
Use the following command to install the
mssql-server-polybaseon Ubuntu:sudo apt-get install mssql-server-polybase -
Restart the [!INCLUDE ssnoversion-md] instance when prompted:
sudo systemctl restart mssql-server
Note
After installation, enable the PolyBase feature.
If you need an offline installation, find the PolyBase package download in the release notes for SQL Server 2019, SQL Server 2022, or SQL Server 2025. Then use the same offline installation steps described in the article Install SQL Server.
::: moniker range="<=sql-server-linux-ver15 || <=sql-server-ver15"
Applies to: [!INCLUDE sssql19-md] only.
-
Use the following command to install the
mssql-server-polybase-hadooppackage:sudo apt-get install mssql-server-polybase-hadoopThe PolyBase Hadoop package depends on the following packages:
mssql-servermssql-server-polybasemssql-server-extensibilitymssql-zulu-jre-11
-
Restart
launchpaddwhen prompted:sudo systemctl restart mssql-launchpadd
Note
After installation, you must set the Hadoop connectivity level. This step only applies to [!INCLUDE sssql19-md].
::: moniker-end
Applies to: [!INCLUDE sssql19-md] and later versions.
-
Add the Microsoft [!INCLUDE ssnoversion-md] repository to Zypper.
For SLES 12:
sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/12/prod.repo sudo zypper --gpg-auto-import-keys refresh
For SLES 15:
sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/15/prod.repo sudo zypper --gpg-auto-import-keys refresh
-
Use the following commands to install the
mssql-server-polybasepackage on SUSE Linux Enterprise Server:sudo zypper install mssql-server-polybase -
Restart the [!INCLUDE ssnoversion-md] instance when prompted:
sudo systemctl restart mssql-server
Note
After installation, enable the PolyBase feature.
If you need an offline installation, find the PolyBase package download in the Release notes for SQL Server 2019 on Linux. Then use the same offline installation steps described in the article Install SQL Server.
After installation, enable PolyBase to access its features. Connect to the installed [!INCLUDE ssnoversion-md] instance and run the following Transact-SQL command:
EXECUTE sp_configure
@configname = 'polybase enabled',
@configvalue = 1;
RECONFIGURE WITH OVERRIDE;Applies to: [!INCLUDE sssql22-md]
To use PolyBase capabilities on Linux, you must enable trace flag 13702 during SQL Server start up. For more information, see Configure SQL Server on Linux with the mssql-conf tool.
If you already have mssql-server-polybase installed, you can update to the latest version with the following commands:
Applies to: [!INCLUDE sssql19-md] only.
sudo yum remove -y mssql-server-polybase-hadoop
sudo yum remove -y mssql-server-polybase
sudo yum check-update
sudo yum install -y mssql-server-polybase
sudo yum install -y mssql-server-polybase-hadoopsudo yum remove -y mssql-server-polybase
sudo yum check-update
sudo yum install -y mssql-server-polybaseRestart the [!INCLUDE ssnoversion-md] instance when prompted:
sudo systemctl restart mssql-serverApplies to: [!INCLUDE sssql19-md] only.
sudo apt-get remove mssql-server-polybase-hadoop
sudo apt-get remove mssql-server-polybase
sudo apt-get update
sudo apt-get install mssql-server-polybase
sudo apt-get install mssql-server-polybase-hadoopsudo apt-get remove mssql-server-polybase
sudo apt-get update
sudo apt-get install mssql-server-polybaseRestart the [!INCLUDE ssnoversion-md] instance when prompted:
sudo systemctl restart mssql-serversudo zypper remove mssql-server-polybase
sudo zypper refresh
sudo zypper install mssql-server-polybaseRestart the [!INCLUDE ssnoversion-md] instance when prompted:
sudo systemctl restart mssql-serverNote
After installation, enable the PolyBase feature.
Applies to: [!INCLUDE sssql25-md] and later versions.
In [!INCLUDE sssql25-md], PolyBase on Linux supports ODBC data sources and requires .NET components that the package manager typically installs.
Starting with [!INCLUDE sssql25-md] Cumulative Update (CU) 4, you can install the required .NET components offline. This method is useful for large-scale deployments and environments without internet access.
You need a machine with internet access to download the .NET runtime and a target [!INCLUDE ssnoversion-md] machine where you install PolyBase.
-
On a machine with internet access, download the supported .NET runtime that PolyBase requires (.NET 8.0.418). Extract the package, and copy the extracted files to the target [!INCLUDE ssnoversion-md] machine.
On the target machine, create the following directory if it doesn't exist:
/opt/mssql-ees-dotnet/.Copy the extracted .NET components to
/opt/mssql-ees-dotnet/. -
Install PolyBase.
If setup can't find the components in the default location (
/opt/mssql-ees-dotnet/), provide the path when prompted. -
If you don't provide a path, setup prompts you to download the components.
PolyBase on Linux can access the following data sources. Use these links for information on how to create an external table when PolyBase is enabled: