Key differences between Machine Learning Services in Azure SQL Managed Instance and SQL Server

The functionality of Machine Learning Services in Azure SQL Managed Instance (preview) is nearly identical to SQL Server Machine Learning Services. Following are some key differences.

Important

Machine Learning Services in Azure SQL Managed Instance is currently in public preview. To sign up, see Sign up for the preview.

Preview limitations

During the preview, the service has the following limitations:

In case of a Service Level Objective (SLO) update, please update the SLO and raise a support ticket to re-enable the dedicated resource limits for R/Python.

Language support

Machine Learning Services in SQL Managed Instance and SQL Server support both Python and R extensibility framework. The key differences are:

  • The initial versions of Python and R are different between Machine Learning Services in SQL Managed Instance and SQL Server:

    System Python R
    SQL Managed Instance 3.7.1 3.5.2
    SQL Server 3.5.2 3.3.3
  • There is no need to configure external scripts enabled via sp_configure. Once you are signed up for the preview, machine learning is enabled for Azure SQL Managed Instance.

Packages

Python and R package management work differently between SQL Managed Instance and SQL Server. These differences are:

  • Packages cannot perform outbound network calls. This limitation is similar to the default firewall rules for Machine Learning Services in SQL Server, but can't be changed in SQL Managed Instance.
  • There is no support for packages that depend on external runtimes (like Java) or need access to OS APIs for installation or usage.

For more information about managing Python and R packages, see:

Resource governance

It is not possible to limit R resources through Resource Governor and external resource pools.

During the public preview, R resources are set to a maximum of 20% of the SQL Managed Instance resources, and depend on which service tier you choose. For more information, see Azure SQL Database purchasing models.

Insufficient memory error

If there is insufficient memory available for R, you will get an error message. Common error messages are:

  • Unable to communicate with the runtime for 'R' script for request id: *******. Please check the requirements of 'R' runtime
  • 'R' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x80004004. ...an external script error occurred: "..could not allocate memory (0 Mb) in C function 'R_AllocStringBuffer'"
  • An external script error occurred: Error: cannot allocate vector of size.

Memory usage depends on how much is used in your R scripts and the number of parallel queries being executed. If you receive the errors above, you can scale your database to a higher service tier to resolve this.

Next steps