Install SQL Server Machine Learning Services with Python and R on an Azure virtual machine
Applies to: SQL Server 2017 (14.x) and later
Learn how to install Python and R with SQL Server Machine Learning Services on a virtual machine in Azure. This eliminates the installation and configuration tasks for Machine Learning Services.
Follow these steps:
- Provision SQL Server virtual machine in Azure
- Unblock the firewall
- Enable ODBC callbacks for remote clients
- Add network protocols
Provision SQL Server virtual machine in Azure
For step by step instructions, see How to provision a Windows SQL Server virtual machine in the Azure portal.
The Configure SQL Server settings step is where you add Machine Learning Services to your instance.
Unblock the firewall
By default, the firewall on the Azure virtual machine includes a rule that blocks network access for local user accounts.
You must disable this rule to ensure that you can access the SQL Server instance from a remote data science client. Otherwise, your machine learning code cannot execute in compute contexts that use the virtual machine's workspace.
To enable access from remote data science clients:
On the virtual machine, open Windows Firewall with Advanced Security.
Select Outbound Rules
Disable the following rule:
Block network access for R local user accounts in SQL Server instance MSSQLSERVER
Enable ODBC callbacks for remote clients
If you expect that clients calling the server will need to issue ODBC queries as part of their machine learning solutions, you must ensure that the Launchpad can make ODBC calls on behalf of the remote client.
To do this, you must allow the SQL worker accounts that are used by Launchpad to log into the instance. For more information, see Add SQLRUserGroup as a database user.
Add network protocols
Enable Named Pipes
R Services (In-Database) uses the Named Pipes protocol for connections between the client and server computers, and for some internal connections. If Named Pipes is not enabled, you must install and enable it on both the Azure virtual machine, and on any data science clients that connect to the server.
Enable TCP/IP
TCP/IP is required for loopback connections. If you get the error "DBNETLIB; SQL Server does not exist or access denied", enable TCP/IP on the virtual machine that supports the instance.