Включить Python в SQL Server 2017 - PullRequest
0 голосов
/ 19 мая 2019

Я выполнил приведенную ниже команду:

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

Из сообщения это выглядит как весь успех:

 Configuration option 'external scripts enabled' changed from 1 to 1. Run the RECONFIGURE statement to install.

Однако при выполнении нижеприведенного скрипта выдается сообщение об ошибке:

exec sp_execute_external_script 
@language =N'Python',
@script=N'OutputDataSet = InputDataSet
print("Input data is {0}".format(InputDataSet))', 
@input_data_1 = N'SELECT 1 as col'

Ошибка:

   Msg 39023, Level 16, State 1, Procedure sp_execute_external_script, Line 1 [Batch Start Line 7]
 'sp_execute_external_script' is disabled on this instance of SQL Server. Use sp_configure 'external scripts enabled' to enable it.

Когда я выполнил: exec sp_configure

Показывает "внешние скрипты включены" run_value как 0

При обновлении "«запустить значение», запустив запрос на обновление:

 update sys.configurations set value_in_use = 1
 where name like 'external scripts enabled'

Получение ошибки:

  Ad hoc updates to system catalogs are not allowed.

Вот сведения о системе (из справки SSMS -> about):

  SQL Server Management Studio          15.0.18118.0
  Microsoft Analysis Services Client Tools  15.0.1300.131
  Microsoft Data Access Components (MDAC)   10.0.17134.1
  Microsoft MSXML                       3.0 6.0 
  Microsoft Internet Explorer           9.11.17134.0
  Microsoft .NET Framework              4.0.30319.42000
  Operating System                      6.3.17134

Microsoft SQL Server 2017 (RTM-CU14) (KB4484710) - 14.0.3076.1 (X64) 
Mar 12 2019 19:29:19 
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Windows 10 Home 10.0 <X64> (Build 17134: )

Также попытался установить последнее обновление SQL Server отсюда (https://www.microsoft.com/en-us/download/details.aspx?id=56128).

Не удалось установить Python.

Как решить эту проблему и запустить Python на SQL Server 2017?Нужно установить какой-либо пакет обновления для SQL Server? Пожалуйста, предложите. Спасибо.

1 Ответ

0 голосов
/ 19 мая 2019

В SQL Server 2017 после запуска EXEC sp_configure 'external scripts enabled', 1 RECONFIGURE WITH OVERRIDE необходимо перезапустить экземпляр.

...