Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server 2016 (13.x) and later versions
This article describes how to install SQL Server Machine Learning Services on Windows offline on computers with no internet access isolated behind a network firewall.
By default, installers connect to Microsoft download sites to get required and updated components for machine learning on SQL Server. If firewall constraints prevent the installer from reaching these sites, you can use an internet-connected device to download files, transfer files to an offline server, and then run setup.
Note
Feature capabilities and installation options vary between versions of SQL Server. Use the version selector dropdown to choose the appropriate version of SQL Server.
In-database analytics consist of database engine instance, plus additional components for R and Python integration, depending on the version of SQL Server.
Offline installation of SQL Server 2022 (16.x) is similar to the online installation experience.
Use SQL Setup to install the Machine Learning services feature.
Download any desired runtimes and copy them to the offline installation server. Custom runtimes for SQL Server 2022 (16.x) are customer-installed. CAB files are not used for SQL Server 2022 (16.x).
Download any desired packages and copy them to the offline installation server. Otherwise, refer to instructions for installation from SQL Setup and installation of any desired custom packages:
On an isolated server, machine learning and R/Python language-specific features are added through CAB files.
To install SQL Server Machine Learning Services (R and Python) on an isolated server, start by downloading the initial release of SQL Server and the corresponding CAB files for R and Python support. Even if you plan to immediately update your server to use the latest cumulative update, an initial release must be installed first.
Note
SQL Server 2019 does not have service packs. The initial release is the only base line, with servicing through cumulative updates only.
On a computer having an internet connection, download the CAB files providing R and Python features for the initial release and the installation media for SQL Server 2019.
Release | Download link |
---|---|
Microsoft R Open | SRO_3.5.2.125_1033.cab |
Microsoft R Server | SRS_9.4.7.25_1033.cab |
Microsoft Python Open | SPO_4.5.12.120_1033.cab |
Microsoft Python Server | SPS_9.4.7.25_1033.cab |
Note
The Java feature is included with the SQL Server installation media and doesn't need a separate CAB file.
On a computer having an internet connection, launch SQL Server 2019 Setup from your installation media.
Double-click setup and choose the Download Media installation type. With this option, setup creates a local .iso (or .cab) file containing the installation media.
On an isolated server, machine learning and R/Python language-specific features are added through CAB files.
To install SQL Server Machine Learning Services (R and Python) on an isolated server, start by downloading the initial release of SQL Server and the corresponding CAB files for R and Python support. Even if you plan to immediately update your server to use the latest cumulative update, an initial release must be installed first.
Note
SQL Server 2017 does not have service packs. It's the first release of SQL Server to use the initial release as the only base line, with servicing through cumulative updates only.
On a computer having an internet connection, download the CAB files providing R and Python features for the initial release and the installation media for SQL Server 2017.
Release | Download link |
---|---|
Microsoft R Open | SRO_3.3.3.24_1033.cab |
Microsoft R Server | SRS_9.2.0.24_1033.cab |
Microsoft Python Open | SPO_9.2.0.24_1033.cab |
Microsoft Python Server | SPS_9.2.0.24_1033.cab |
On a computer having an internet connection, launch SQL Server 2017 Setup from your installation media.
Double-click setup and choose the Download Media installation type. With this option, setup creates a local .iso (or .cab) file containing the installation media.
On an isolated server, machine learning and R language-specific features are added through CAB files.
SQL Server 2016 in-database analytics is R-only, with just two CAB files for product packages and Microsoft's distribution of open-source R, respectively. Start by installing any one of these releases: RTM, SP 1, SP 2. Once a base installation is in place, cumulative updates can be applied as a next step.
On a computer having an internet connection, download the CAB files used by setup to install in-database analytics on SQL Server 2016.
Release | Microsoft R Open | Microsoft R Server |
---|---|---|
SQL Server 2016 RTM | SRO_3.2.2.803_1033.cab | SRS_8.0.3.0_1033.cab |
SQL Server 2016 SP 1 | SRO_3.2.2.15000_1033.cab | SRS_8.0.3.15000_1033.cab |
SQL Server 2016 SP 2 | SRO_3.2.2.16000_1033.cab | SRS_8.0.3.17000_1033.cab |
You can install SQL Server 2016 RTM, SP 1, or SP 2 as your first installation on the target computer. Any of these versions can accept a cumulative update. Locate the SQL Server 2016 Setup application in your installation media.
Copy the SQL Server installation media (.iso or .cab) and in-database analytics CAB files to the target computer. Place the CAB files and installation media file in the same folder on the target machine, such as the setup user's %TEMP% folder.
The %TEMP% folder is required for Python CAB files. For R, you can use %TEMP% or set the myrcachedirectory
parameter to the CAB path.
When you run SQL Server Setup on a computer disconnected from the internet, Setup adds an Offline installation page to the wizard so that you can specify the location of the CAB files you copied in the previous step.
To begin installation, double-click the .iso or .cab file to access the installation media. You should see the setup.exe file.
Right-click setup.exe and run as administrator.
When the setup wizard displays the licensing page for open-source R or Python components, click Accept. Acceptance of licensing terms allows you to proceed to the next step.
When you get to the Offline installation page, in Install Path, specify the folder containing the CAB files you copied earlier.
Continue following the on-screen prompts to complete the installation.
We recommend that you apply the latest cumulative update to both the database engine and machine learning components.
Start with a baseline instance. You can only apply cumulative updates to existing installations of the initial release of SQL Server.
On an internet connected device, go to the cumulative update list for your version of SQL Server. See Determine the version, edition, and update level of SQL Server and its components.
Select the latest cumulative update to download the executable.
Transfer all files to the same folder on the offline computer.
Run SQL Setup. Accept the licensing terms, and on the Feature selection page, review the features for which cumulative updates are applied. You should see every feature installed for the current instance, including machine learning features.
Cumulative updates are installed through the Setup program.
Start with a baseline instance. You can only apply cumulative updates to existing installations of the initial release of SQL Server.
On an internet connected device, go to the cumulative update list for your version of SQL Server. See Determine the version, edition, and update level of SQL Server and its components.
Cumulative updates are installed through the Setup program.
Start with a baseline instance. You can only apply cumulative updates to existing installations of the SQL Server 2016 initial release, SQL Server 2016 SP 1, or SQL Server 2016 SP 2.
On an internet connected device, go to the cumulative update list for your version of SQL Server. See Determine the version, edition, and update level of SQL Server and its components.
Select the latest cumulative update to download the executable.
Get corresponding CAB files for R and Python. For download links, see CAB downloads for cumulative updates on SQL Server in-database analytics instances.
Transfer all files, executable and CAB files, to the same folder on the offline computer.
Run Setup. Accept the licensing terms, and on the Feature selection page, review the features for which cumulative updates are applied. You should see every feature installed for the current instance, including machine learning features.
Continue through the wizard, accepting the licensing terms for R and Python distributions. During installation, you are prompted to choose the folder location containing the updated CAB files.
For R feature integration only, you should set the MKL_CBWR environment variable to ensure consistent output from Intel Math Kernel Library (MKL) calculations.
In Control Panel, click System and Security > System > Advanced System Settings > Environment Variables.
Create a new User or System variable.
MKL_CBWR
AUTO
This step requires a server restart. If you are about to enable script execution, you can hold off on the restart until all of the configuration work is done.
After installation is finished, restart the service and then configure the server to enable script execution:
An initial offline installation of SQL Server Machine Learning Services requires the same configuration as an online installation:
After installation is finished, restart the service and then configure the server to enable script execution:
An initial offline installation of SQL Server R Services requires the same configuration as an online installation:
To use Machine Learning Services to execute Python and R scripts in-database, see:
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Certification
Microsoft Certified: Azure Data Scientist Associate - Certifications
Manage data ingestion and preparation, model training and deployment, and machine learning solution monitoring with Python, Azure Machine Learning and MLflow.
Documentation
Install Machine Learning Server (Standalone) - SQL Server Machine Learning Services
Setup a standalone machine learning server for Python and R. A standalone server as installed by SQL Server Setup is functionally equivalent to the non-SQL-branded versions of Microsoft Machine Learning Server.
CAB download updates for offline install - SQL Server Machine Learning Services
Download Python and R CAB files for SQL Server Machine Learning Services. These CAB files contain updates to the Machine Learning Services (Python and R) feature and are used when installing SQL Server on a server without internet access.
Install SQL Server 2022 Machine Learning Services on Windows - SQL Server Machine Learning Services
Learn how to install SQL Server 2022 Machine Learning Services on Windows to run Python, R, or Java scripts in-database.