Member-only story
How to enable the execution of Python scripts within SQL Server
Learn how to setup and run python (or R) scripts within your SQL code
Step 1: Enable Machine Learning Services within SQL Server
Please note this step requires administrator rights to run/re-run the setup configuration.
1.1 Download SQL Server (link). Or, if you already have SQL Server installed, acquire the SQL Server installation media and from the root folder, open Setup.exe
. This will start the setup wizard.
1.2 Select the Installation tab on the left hand side, and then New SQL Server stand-alone installation or add features to an existing installation.
1.3 On the Features Selection tab (also on the left) enable:
- Database Engine Services
- Machine Learning Services and Language Extension
- Python (and/or R)
Continue through the setup process and complete installation.
Step 2: enable external script execution
I personally ran this section using SQL Server Management Studio (SSMS). Other options include Azure Data Studio and Visual Studio.