Will SQL Server enable sp_execute_external_script to work with a previously installed Anaconda3

James Longstreet 26 Reputation points
2022-12-13T19:13:56.03+00:00

Having read Erland's article

https://www.sqlservergeeks.com/a-tip-about-using-python-for-regular-expressions-in-t-sql-by-erland-sommarskog/

on regular expressions for SQL Server and the advantage of enabling sp_execute_external_script. This works with the version of Anaconda3 that installs with SQL Server 2019. There is an issue on the laptop used here because group policy (via the government policy) demands the use of FIPS. For this reason, installing R or Java will fail (I suspect it doesn't sit well with managed copies of encryption). Anaconda requires many over-rides during installation via Privileged Management Administrator and is installed locally through a painstaking process.

My bigger fear is that if I remove Anaconda3 to install using SQL, it will either fail similarly as did R and Java, or worse, I'll have trouble re-installing the version of Anaconda currently on the machine.

So again, the question is whether or not it is possible to enable sp_execute_external_script on SQL without installing R, Python, or Java. I tried Java and R and both fail to install. The Java and Python are already installed.

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,352 questions
SQL Server | Other
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 123K Reputation points MVP Volunteer Moderator
    2022-12-13T22:36:08.173+00:00

    I am not sure that I understand the question. To use Python from SQL Server, you need to do one of:

    1) Use the Python that comes with SQL 2017 or SQL 2019.
    2) Install any version of Python you like as described on https://learn.microsoft.com/en-us/sql/machine-learning/install/sql-machine-learning-services-windows-install-sql-2022. (That page is for SQL 2022, but it should be good for SQL 2019 as well.)

    If you don't have any external languages installed, you can still enable sp_execute_external_script, but you don't have much use for it, obviously.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.