-1

I am trying to configure my SQL Server Management Studio to allow Python/R.
I know SQL very well but neither Python nor R.

I ran the SQL Server machine learning services today and then tried to run the below hello world in SQL Server:

EXEC sp_execute_external_script  
        @language = N'Python', 
        @script = N'print("Hello World")'

I get the following error:

Could not find stored procedure 'sp_execute_external_script'.

I did some research and thought that maybe 'external scripts' were not enabled.

I executed:

EXECUTE sp_configure;
GO

and do not see the option 'external scripts enabled'.

I was advised to run this script

EXEC sp_configure 'external scripts enabled', 1
RECONFIGURE WITH OVERRIDE
GO

and got the following errors:

Msg 15123, Level 16, State 1, Procedure sp_configure, Line 62 [Batch Start Line 3]
The configuration option 'external scripts enabled' does not exist, or it may be an advanced option.

Msg 5812, Level 14, State 1, Line 5
You do not have permission to run the RECONFIGURE statement.

I am extremely new to Python and am attempting to get this to work to start using it for work.

Is it possible that machine learning services was not successfully installed? How would I know if it was successfully installed?

Thanks for any help.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • This might get better results over on [dba.se]. – ChrisGPT was on strike Aug 21 '20 at 16:53
  • 1
    Please include the edition & version of the SQL Server you are connected to? – sgdata Aug 21 '20 at 16:54
  • I could be wrong, but you may have just dropped the semicolon on your reconfigure command. See my answer here, most of the way to the bottom - https://stackoverflow.com/questions/59364167/sql-server-machine-learning-services-r-version-3-5/60232104#60232104 – sgdata Aug 21 '20 at 16:55
  • sql sever management studio 18.6 version 15.0.18338.0 – g.senorsenor Aug 21 '20 at 17:00
  • You need to tell us the version of the SQL Server **engine** - not the GUI tool ..... run `SELECT @@VERSION` and show the output – marc_s Aug 21 '20 at 17:03
  • thanks Microsoft SQL Server 2014 (SP2-CU7) (KB4032541) - 12.0.5556.0 (X64) Aug 17 2017 12:07:38 Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 (Build 9600: ) – g.senorsenor Aug 21 '20 at 17:05
  • 1
    You don't have the required permission to execute 'reconfigure'. There is no problem in the script. Don't forget to restart the sql server once you 'reconfigure.' – Ankit Mahajan Aug 21 '20 at 17:07

1 Answers1

0
  1. I think you missed a semicolon on the execution of your reconfigure statement:

Source: External Scripts Enabled server configuration option

sp_configure 'external scripts enabled', 1;
RECONFIGURE WITH OVERRIDE;  
  1. You will need to run this with ALTER SETTINGS permissions

Source: RECONFIGURE (Transact-SQL)

sgdata
  • 2,543
  • 1
  • 19
  • 44
  • thanks. just ran it with the smicolon and still get the following error messages: Msg 15123, Level 16, State 1, Procedure sp_configure, Line 62 [Batch Start Line 8] The configuration option 'external scripts enabled' does not exist, or it may be an advanced option. Msg 5812, Level 14, State 1, Line 10 You do not have permission to run the RECONFIGURE statement. – g.senorsenor Aug 21 '20 at 17:01
  • >>>You will need to run this with ALTER SETTINGS permissions You mean after I obtain the proper permission or is alter settings something i add to the script – g.senorsenor Aug 21 '20 at 18:01
  • I assume that is a privilege that is granted to a specific user or group - which you will have added to your executing credential user. – sgdata Aug 21 '20 at 18:31