啟用外部指令碼伺服器設定選項External Scripts Enabled server configuration option

適用於: 是SQL Server 否Azure SQL Database 否Azure Synapse Analytics (SQL DW) 否平行處理資料倉儲 APPLIES TO: yesSQL Server noAzure SQL Database noAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

適用對象SQL Server 2016 (13.x)SQL Server 2016 (13.x)R Services (資料庫內)R Services (In-Database)SQL Server 2017 (14.x)SQL Server 2017 (14.x)機器學習服務Machine Learning ServicesApplies to: SQL Server 2016 (13.x)SQL Server 2016 (13.x) R Services (資料庫內)R Services (In-Database) and SQL Server 2017 (14.x)SQL Server 2017 (14.x) 機器學習服務Machine Learning Services

使用 external scripts enabled 選項以啟用具有特定遠端語言擴充功能之指令碼的執行。Use the external scripts enabled option to enable the execution of scripts with certain remote language extensions. 依預設,此屬性為 OFF。This property is OFF by default. 如果已安裝進階分析服務,安裝程式就可以選擇將此屬性設定為 true。When Advanced Analytics Services is installed, setup can optionally set this property to true.

RemarksRemarks

您必須先啟用 external script enabled 選項,才能使用 sp_execute_external_script 程序來執行外部指令碼。You must enable the external script enabled option before you can execute an external script using the sp_execute_external_script procedure. 使用 sp_execute_external_script 執行以所支援語言 (例如 R 或 Python) 所撰寫的指令碼。Use sp_execute_external_script to execute scripts written in a supported language such as R or Python.

  • 針對 SQL Server 2016 (13.x)SQL Server 2016 (13.x)For SQL Server 2016 (13.x)SQL Server 2016 (13.x)

    R Services (資料庫內)R Services (In-Database) 支援 SQL Server 2016 (13.x)SQL Server 2016 (13.x) 中的 R 語言,以及一組 R 工作站工具和連線程式庫。includes support for the R language in SQL Server 2016 (13.x)SQL Server 2016 (13.x), and a set of R workstation tools and connectivity libraries.

    SQL ServerSQL Server 安裝程式期間安裝 [進階分析擴充功能] 功能,以啟用 R 指令碼的執行。Install the Advanced Analytics Extensions feature during SQL ServerSQL Server setup to enable the execution of R scripts. 預設會安裝 R 語言。The R language is installed by default.

  • 針對 SQL Server 2017 (14.x)SQL Server 2017 (14.x)For SQL Server 2017 (14.x)SQL Server 2017 (14.x)

    機器學習服務Machine Learning Services 使用與 SQL Server 2016 相同的結構,但支援 Python 語言。uses the same architecture as in SQL Server 2016, but provides support for the Python language.

    SQL ServerSQL Server 安裝程式期間安裝 [進階分析擴充功能] 功能,以啟用外部指令碼的執行。Install the Advanced Analytics Extensions feature during SQL ServerSQL Server setup to enable the execution of external scripts. 請務必在初始安裝期間選取至少一個語言:R、Python 或兩者。Be sure to select at least one language during initial setup: either R or Python, or both.

其他需求Additional requirements

安裝後,若要啟用外部指令碼,請執行下列指令碼:After setup, to enable external scripts, execute the following script:

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

您必須重新啟動 SQL ServerSQL Server ,讓這項變更生效。You must restart SQL ServerSQL Server to make this change effective.

如需詳細資訊,請參閱設定 SQL Server Machine LearningFor more information, see Set up SQL Server Machine Learning.

另請參閱See also

sp_configure (Transact-SQL)sp_configure (Transact-SQL)

RECONFIGURE (Transact-SQL)RECONFIGURE (Transact-SQL)

sp_execute_external_script (Transact-SQL)sp_execute_external_script (Transact-SQL)

SQL Server 機器學習服務SQL Server Machine Learning Services