在 Windows 上安装 PolyBaseInstall PolyBase on Windows
09/24/2018
本文内容
适用于:Applies to:SQL ServerSQL Server(所有支持的版本)
SQL ServerSQL Server (all supported versions)-仅限 Windows适用于:Applies to:
SQL ServerSQL Server(所有支持的版本)
SQL ServerSQL Server (all supported versions) - Windows only
若要安装 SQL Server 试用版,请转到 SQL Server 评估。To install a trial version of SQL Server, go to SQL Server evaluations.
先决条件Prerequisites
64 位 SQL Server 评估版。64-bit SQL Server Evaluation edition.
Microsoft .NET Framework 4.5。Microsoft .NET Framework 4.5.
最小内存:4 GB。Minimum memory: 4 GB.
最小硬盘空间:2 GB。Minimum hard-disk space: 2 GB.
建议:至少 16 GB 的 RAM。Recommended: Minimum of 16-GB RAM.
必须启用 TCP/IP 才能使 PolyBase 正常工作。TCP/IP must be enabled for PolyBase to function correctly. SQL Server 的所有版本均默认启用 TCP/IP,Developer 和 Express SQL Server 版本除外。TCP/IP is enabled by default on all editions of SQL Server except for the Developer and Express SQL Server editions. 若要使 PolyBase 在 Developer 和 Express 版本上正常工作,必须启用 TCP/IP 连接。For PolyBase to function correctly on the Developer and Express editions, you must enable TCP/IP connectivity.
备注
在每台计算机上仅可在一个 SQL Server 实例上安装 PolyBase。PolyBase can be installed on only one SQL Server instance per machine.
备注
若要使用 PolyBase,必须对数据库具有 sysadmin 或 CONTROL SERVER 级别的权限。In order to use PolyBase you must have sysadmin or CONTROL SERVER level permissions on the database.
重要
若要对 Hadoop 使用计算下推功能,目标 Hadoop 群集必须具有 HDFS、YARN 和 MapReduce 的核心组件且已启用作业历史记录服务器。To use the computation pushdown functionality against Hadoop, the target Hadoop cluster must have the core components of HDFS, YARN and MapReduce, with the job history server enabled. PolyBase 通过 MapReduce 提交下推查询,并且从作业历史记录服务器拉取状态。PolyBase submits the pushdown query via MapReduce and pulls status from the job history server. 缺少任一组件,查询都会失败。Without either component, the query fails.
单节点或 PolyBase 横向扩展组Single node or PolyBase scale-out group
在 SQL Server 实例上安装 PolyBase 之前,决定是需要单节点安装还是需要 PolyBase 横向扩展组。Before you install PolyBase on your SQL Server instances, decide whether you want a single node installation or a PolyBase scale-out group.
对于 PolyBase 横向扩展组,请确保:For a PolyBase scale-out group, make sure that:
所有计算机都位于同一域中。All the machines are on the same domain.
在 PolyBase 安装期间使用相同的服务帐户和密码。You use the same service account and password during PolyBase installation.
SQL Server 实例彼此之间可以通过网络进行通信。Your SQL Server instances can communicate with one another over the network.
SQL Server 实例的 SQL Server 版本相同。The SQL Server instances are all the same version of SQL Server.
独立安装或在横向扩展组中安装 PolyBase 后,将无法再更改。After you install PolyBase either standalone or in a scale-out group, you can't change. 若要更改此设置,必须卸载并重新安装该功能。To change this setting, you have to uninstall and reinstall the feature.
使用安装向导Use the installation wizard
运行 SQL Server setup.exe。Run the SQL Server setup.exe.
选择“安装”,然后选择“全新独立 SQL Server 安装或添加功能” 。Select Installation, and then select New standalone SQL Server installation or add features.
在“功能选择”页上,选择“针对外部数据的 PolyBase 查询服务”。On the Feature Selection page, select PolyBase Query Service for External Data.
备注
SQL Server 2019 PolyBase 现在包含附加选项“适用于 HDFS 数据源的 Java 连接器”。SQL Server 2019 PolyBase now includes an additional option Java connector for HDFS data sources. See SQL Server preview features for more information about this feature.
在服务器配置页上,将“SQL Server PolyBase 引擎服务”和“SQL Server PolyBase 数据移动服务”配置为在同一域帐户下运行 。On the Server Configuration page, configure the SQL Server PolyBase Engine Service and SQL Server PolyBase Data Movement Service to run under the same domain account.
重要
在 PolyBase 横向扩展组中,所有节点上的 PolyBase 引擎和 PolyBase 数据移动服务必须在同一个域帐户下运行。In a PolyBase scale-out group, the PolyBase Engine and PolyBase Data Movement service on all nodes must run under the same domain account.
在“PolyBase 配置页”上,选择两个选项之一。On the PolyBase Configuration page, select one of the two options. For more information, see PolyBase scale-out groups.
将 SQL Server 实例用作已启用 PolyBase 的独立实例。Use the SQL Server instance as a standalone PolyBase-enabled instance.
选择此选项可将 SQL Server 实例用作独立的头节点。Choose this option to use the SQL Server instance as a standalone head node.
将 SQL Server 实例作为 PolyBase 横向扩展组的一部分使用。Use the SQL Server instance as part of a PolyBase scale-out group. 此选项将打开防火墙以允许传入连接。This option opens the firewall to allow incoming connections. 允许与 SQL Server 数据库引擎、SQL Server PolyBase 引擎、SQL Server PolyBase 数据移动服务和 SQL Browser 建立连接。Connections are allowed for the SQL Server Database Engine, SQL Server PolyBase Engine, SQL Server PolyBase Data Movement service, and the SQL browser. 防火墙还允许来自 PolyBase 横向扩展组中其他节点的传入连接。The firewall also allows incoming connections from other nodes in a PolyBase scale-out group.
此选项还将启用 Microsoft 分布式事务处理协调器 (MSDTC) 防火墙连接并修改 MSDTC 注册表设置。This option also enables Microsoft Distributed Transaction Coordinator (MSDTC) firewall connections and modifies MSDTC registry settings.
在 PolyBase 配置页上,指定具有至少六个端口的端口范围。On the PolyBase Configuration page, specify a port range with at least six ports. SQL Server 安装程序分配该范围中的前六个可用端口。SQL Server setup allocates the first six available ports from the range.
使用命令提示符Use a command prompt
使用此表中的值来创建安装脚本。Use the values in this table to create installation scripts. SQL Server PolyBase 引擎和 SQL Server PolyBase 数据移动服务必须在同一帐户下运行。The SQL Server PolyBase Engine and SQL Server PolyBase Data Movement service must run under the same account. 在 PolyBase 横向扩展组中,所有节点上的 PolyBase 服务必须在同一个域帐户下运行。In a PolyBase scale-out group, PolyBase services on all nodes must run under the same domain account.
SQL Server 组件 (SQL Server component)SQL Server component
参数和值Parameter and values
说明Description
SQL Server 安装程序控件SQL Server setup control
必需Required
/FEATURES=PolyBase/FEATURES=PolyBase
选择 PolyBase 功能。Selects PolyBase feature.
SQL Server PolyBase 引擎SQL Server PolyBase Engine
可选Optional
/PBENGSVCACCOUNT/PBENGSVCACCOUNT
指定引擎服务的帐户。Specifies the account for the engine service. 默认为 NT Authority\NETWORK SERVICE。The default is NT Authority\NETWORK SERVICE.
SQL Server PolyBase 引擎SQL Server PolyBase Engine
可选Optional
/PBENGSVCPASSWORD/PBENGSVCPASSWORD
指定引擎服务帐户的密码。Specifies the password for the engine service account.
SQL Server PolyBase 引擎SQL Server PolyBase Engine
可选Optional
/PBENGSVCSTARTUPTYPE/PBENGSVCSTARTUPTYPE
指定 PolyBase 引擎的启动模式:自动(默认)、禁用和手动。Specifies the startup mode for the PolyBase Engine: Automatic (default), Disabled, and Manual.
SQL Server PolyBase 数据移动SQL Server PolyBase Data Movement
可选Optional
/PBDMSSVCACCOUNT/PBDMSSVCACCOUNT
指定数据移动服务的帐户。Specifies the account for the data movement service. 默认为 NT Authority\NETWORK SERVICE。The default is NT Authority\NETWORK SERVICE.
SQL Server PolyBase 数据移动SQL Server PolyBase Data Movement
可选Optional
/PBDMSSVCPASSWORD/PBDMSSVCPASSWORD
指定数据移动帐户的密码。Specifies the password for the data movement account.
SQL Server PolyBase 数据移动SQL Server PolyBase Data Movement
可选Optional
/PBDMSSVCSTARTUPTYPE/PBDMSSVCSTARTUPTYPE
指定数据移动服务的启动模式:自动(默认)、禁用和手动。Specifies the startup mode for the data movement service: Automatic (default), Disabled, and Manual.
PolyBasePolyBase
可选Optional
/PBSCALEOUT/PBSCALEOUT
指定是否将 SQL Server 实例用作 PolyBase 横向扩展计算组的一部分。Specifies whether the SQL Server instance is used as a part of a PolyBase scale-out computational group.
支持的值:True、False。Supported values: True, False.
PolyBasePolyBase
可选Optional
/PBPORTRANGE/PBPORTRANGE
指定一个端口范围,其中至少具有六个端口用于 PolyBase 服务。Specifies a port range with at least six ports for PolyBase services. 示例:Example:
/PBPORTRANGE=16450-16460
SQL Server 组件 (SQL Server component)SQL Server component
参数和值Parameter and values
说明Description
SQL Server 安装程序控件SQL Server setup control
必需Required
/FEATURES=PolyBaseCore, PolyBaseJava, PolyBase/FEATURES=PolyBaseCore, PolyBaseJava, PolyBase
PolyBaseCore 安装对除 Hadoop 连接外的所有 PolyBase 功能的支持。PolyBaseCore installs support for all PolyBase features except Hadoop connectivity. PolyBaseJava 支持 Hadoop 连接。PolyBaseJava enables Hadoop connectivity. PolyBase 安装两者。PolyBase installs both.
SQL Server PolyBase 引擎SQL Server PolyBase Engine
可选Optional
/PBENGSVCACCOUNT/PBENGSVCACCOUNT
指定引擎服务的帐户。Specifies the account for the engine service. 默认为 NT Authority\NETWORK SERVICE。The default is NT Authority\NETWORK SERVICE.
SQL Server PolyBase 引擎SQL Server PolyBase Engine
可选Optional
/PBENGSVCPASSWORD/PBENGSVCPASSWORD
指定引擎服务帐户的密码。Specifies the password for the engine service account.
SQL Server PolyBase 引擎SQL Server PolyBase Engine
可选Optional
/PBENGSVCSTARTUPTYPE/PBENGSVCSTARTUPTYPE
指定 PolyBase 引擎的启动模式:自动(默认)、禁用和手动。Specifies the startup mode for the PolyBase Engine: Automatic (default), Disabled, and Manual.
SQL Server PolyBase 数据移动SQL Server PolyBase Data Movement
可选Optional
/PBDMSSVCACCOUNT/PBDMSSVCACCOUNT
指定数据移动服务的帐户。Specifies the account for data movement service. 默认为 NT Authority\NETWORK SERVICE。The default is NT Authority\NETWORK SERVICE.
SQL Server PolyBase 数据移动SQL Server PolyBase Data Movement
可选Optional
/PBDMSSVCPASSWORD/PBDMSSVCPASSWORD
指定数据移动帐户的密码。Specifies the password for the data movement account.
SQL Server PolyBase 数据移动SQL Server PolyBase Data Movement
可选Optional
/PBDMSSVCSTARTUPTYPE/PBDMSSVCSTARTUPTYPE
指定数据移动服务的启动模式:自动(默认)、禁用和手动。Specifies the startup mode for the data movement service: Automatic (default), Disabled, and Manual.
PolyBasePolyBase
可选Optional
/PBSCALEOUT/PBSCALEOUT
指定是否将 SQL Server 实例用作 PolyBase 横向扩展计算组的一部分。Specifies whether the SQL Server instance is used as a part of a PolyBase scale-out computational group.
支持的值:True、False。Supported values: True, False.
PolyBasePolyBase
可选Optional
/PBPORTRANGE/PBPORTRANGE
指定一个端口范围,其中至少具有六个端口用于 PolyBase 服务。Specifies a port range with at least six ports for PolyBase services. 示例:Example:
/PBPORTRANGE=16450-16460
示例Example
此示例显示一个示例安装程序脚本。This example shows a sample setup script.
Setup.exe /Q /ACTION=INSTALL /IACCEPTSQLSERVERLICENSETERMS /FEATURES=SQLEngine,PolyBase
/INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS="\\Administrator"
/INSTANCEDIR="C:\Program Files\Microsoft SQL Server" /PBSCALEOUT=TRUE
/PBPORTRANGE=16450-16460 /SECURITYMODE=SQL /SAPWD=""
/PBENGSVCACCOUNT="\" /PBENGSVCPASSWORD=""
/PBDMSSVCACCOUNT="\" /PBDMSSVCPASSWORD=""
启用 PolyBaseEnable PolyBase
安装完成后,必须启用 PolyBase 来获取其功能。After installation, PolyBase must be enabled to access its features. 使用以下 Transact-SQL 命令。Use the following Transact-SQL command. 在大数据群集安装过程中部署的 SQL 2019 实例默认启用此设置。SQL 2019 instances deployed during Big Data Cluster installation have this setting enabled by default.
exec sp_configure @configname = 'polybase enabled', @configvalue = 1;
RECONFIGURE;
安装后注意事项Post-installation notes
PolyBase 安装三个用户数据库:DWConfiguration、DWDiagnostics 和 DWQueue。PolyBase installs three user databases, DWConfiguration, DWDiagnostics, and DWQueue. 这些数据库供 PolyBase 使用。These databases are for PolyBase use. 请勿更改或删除它们。Don't alter or delete them.
如何确认安装How to confirm installation
运行以下命令。Run the following command. 如果已安装 PolyBase,则返回 1。If PolyBase is installed, the return is 1. 否则返回 0。Otherwise, it's 0.
SELECT SERVERPROPERTY ('IsPolyBaseInstalled') AS IsPolyBaseInstalled;
防火墙规则Firewall rules
SQL Server PolyBase 安装程序将在计算机上创建以下防火墙规则:SQL Server PolyBase setup creates the following firewall rules on the machine:
SQL Server PolyBase - 数据库引擎 - (TCP-In)SQL Server PolyBase - Database Engine - (TCP-In)
SQL Server PolyBase - PolyBase 服务 - (TCP-In)SQL Server PolyBase - PolyBase Services - (TCP-In)
SQL Server PolyBase - SQL Browser - (UDP-In)SQL Server PolyBase - SQL Browser - (UDP-In)
安装时,如果使用 SQL Server 实例作为 PolyBase 横向扩展组中的一部分,则将启用这些规则。At installation, if you use the SQL Server instance as part of a PolyBase scale-out group, these rules are enabled. 防火墙将开启以允许传入连接。The firewall opens to allow incoming connections. 允许将这些连接用于 SQL Server 数据库引擎、SQL Server PolyBase 引擎、SQL Server PolyBase 数据移动服务和 SQL Browser。They're allowed for the SQL Server Database Engine, SQL Server PolyBase Engine, SQL Server PolyBase Data Movement service, and the SQL browser. 如果安装期间未运行计算机上的防火墙服务,SQL Server 安装程序将无法启用这些规则。If the firewall service on the machine isn't running during installation, SQL Server setup fails to enable these rules. 在这种情况下,请在计算机上启动防火墙服务并启用这些安装后规则。In that case, start the firewall service on the machine and enable these rules post-installation.
启用防火墙规则的步骤To enable the firewall rules
打开“控制面板”Open Control Panel.
选择“系统和安全”,然后选择“Windows 防火墙” 。Select System and Security, and select Windows Firewall.
选择“高级设置”,然后选择“入站规则” 。Select Advanced Settings, and select Inbound rules.
右键单击已禁用的规则,然后选择“启用规则”。Right-click the disabled rule, and then select Enable rule.
PolyBase 服务帐户PolyBase service accounts
若要更改 PolyBase 引擎和 PolyBase 数据移动服务的服务帐户,请卸载并重新安装 PolyBase 功能。To change the service accounts for the PolyBase Engine and PolyBase Data Movement service, uninstall and reinstall the PolyBase feature.
后续步骤Next steps