简体   繁体   中英

Python/R in SQL Server Management Studio v18.6

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.

  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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM