简体   繁体   English

SQL Server Management Studio v18.6 中的Python/R

[英]Python/R in SQL Server Management Studio v18.6

I am trying to configure my SQL Server Management Studio to allow Python/R.我正在尝试配置我的 SQL Server Management Studio 以允许使用 Python/R。
I know SQL very well but neither Python nor R.我很了解 SQL,但既不了解 Python,也不了解 R。

I ran the SQL Server machine learning services today and then tried to run the below hello world in SQL Server:我今天运行了 SQL 服务器机器学习服务,然后尝试在 SQL 服务器运行下面的 hello world:

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'.找不到存储过程“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]消息 15123,级别 16,State 1,过程 sp_configure,第 62 行 [批处理启动第 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消息 5812,14 级,State 1,第 5 行
You do not have permission to run the RECONFIGURE statement.您无权运行 RECONFIGURE 语句。

I am extremely new to Python and am attempting to get this to work to start using it for work.我对 Python 非常陌生,我正试图让它工作以开始使用它工作。

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您需要使用 ALTER SETTINGS 权限运行它

Source: RECONFIGURE (Transact-SQL)来源: RECONFIGURE (Transact-SQL)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用SQL Server Management Studio 2008 r2和adodbapi设置并连接到本地SQLEXPRESS数据库 - Set up and connect to local SQLEXPRESS database using SQL Server Management Studio 2008 r2 and adodbapi How to do SQL Server transactions with Python through SQLAlchemy without blocking access to db tables in SQL Server Management Studio? - How to do SQL Server transactions with Python through SQLAlchemy without blocking access to db tables in SQL Server Management Studio? 如何在 SQL 服务器管理工作室中使用 pyodbc 放置 pandas DataFrame - How to put pandas DataFrame using pyodbc in SQL Server Management Studio 从 .ipynb 文件导入 SQL server Management studio 备份 - Import SQL server Management studio backup from an .ipynb file 在Python中执行用于在SQL Management Studio中运行的.sql文件 - Execute .sql files that are used to run in SQL Management Studio in python 如何在SQL Server管理工作室中运行exe文件 - How can I run an exe file in SQL Server management studio 2013,'在查询期间丢失与 MySQL 服务器的连接 - Pymysql Microsoft sql 服务器管理工作室 - 2013, 'Lost connection to MySQL server during query - Pymysql Microsoft sql server management Studio 远程连接到 MS SQL - 使用 pyodbc 时出错与使用 SQL Server Management Studio 成功 - Remote connection to MS SQL - Error using pyodbc vs success using SQL Server Management Studio 从熊猫读取时,MS SQL Server Management Studio导出为CSV会引入额外的字符 - MS SQL Server Management Studio export to CSV introduces extra character when reading from pandas 如何在续集服务器管理工​​作室2017中使用正确的语法直接运行python代码 - How to run python code directly with correct syntax within sequel server management studio 2017
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM