连接 SQL Server 大数据群集SQL Server Big Data Clusters:Active Directory 模式Connect SQL Server 大数据群集SQL Server Big Data Clusters: Active Directory mode

本文介绍如何在 Active Directory 模式下连接到已部署的 SQL Server 大数据群集终结点。This article describes how to connect to SQL Server Big Data Cluster endpoints deployed in Active Directory mode. 本文中的任务要求在 Active Directory 模式下完成 SQL Server 大数据群集部署。The tasks in this article require that you have a SQL Server Big Data Cluster deployed in Active Directory mode. 如果没有群集,请参阅在 Active Directory 模式下部署 SQL Server 大数据群集SQL Server Big Data ClustersIf you do not have a cluster, refer to Deploy SQL Server 大数据群集SQL Server Big Data Clusters in Active Directory mode.

概述Overview

通过 AD 身份验证登录 SQL Server 主实例。Log in to SQL Server master instance with AD Auth.

要验证与 SQL Server 实例的 AD 连接,请使用 sqlcmd 连接到 SQL 主实例。To verify AD connections to the SQL Server instance, connect to the SQL master instance with sqlcmd. 部署时,会自动为提供的组创建登录名(clusterUsersclusterAdmins)。Logins are automatically be created for the provided groups upon deployment (clusterUsers and clusterAdmins).

如果使用的是 Linux,请先以 AD 用户身份运行 kinit,然后运行 sqlcmdIf you are using Linux, first run kinit as the AD user, then run sqlcmd. 如果使用的是 Windows,则只需以所需用户身份从已加入域的客户端计算机登录。If you are using Windows, simply log in as your desired user from a domain joined client machine.

从 Linux/Mac 连接到主实例Connect to master instance from Linux/Mac

kinit <username>@<domain name>
sqlcmd -S <DNS name for master instance>,31433 -E

从 Windows 连接到主实例Connect to master instance from Windows

sqlcmd -S <DNS name for master instance>,31433 -E

使用 Azure Data Studio 或 SSMS 登录到 SQL Server 主实例Log in to SQL Server master instance using Azure Data Studio or SSMS

从已加入域的客户端,可以打开 SSMS 或 Azure Data Studio,并连接到主实例。From a domain joined client, you can open SSMS or Azure Data Studio and connect to the master instance. 这与使用 AD 身份验证连接到任何 SQL Server 实例的体验相同。This is the same experience as connecting to any SQL Server instance using AD authentication.

从 SSMS:From SSMS:

SSMS 中的“连接到 SQL Server”对话框

从 Azure Data Studio:From Azure Data Studio:

Azure Data Studio 中的“连接到 SQL Server”对话框}}

通过 AD 身份验证登录到控制器Log in to controller with AD authentication

通过 AD 身份验证从 Linux/Mac 连接到控制器Connect to controller with AD authentication from Linux/Mac

使用 Azure Data CLI (azdata)Azure Data CLI (azdata) 和 AD 身份验证连接到控制器终结点有两个选择。There are two options for connecting to the controller endpoint using Azure Data CLI (azdata)Azure Data CLI (azdata) and AD authentication. 可以使用 --endpoint/-e 参数:You can use the --endpoint/-e parameter:

kinit <username>@<domain name>
azdata login -e https://<controller DNS name>:30080 --auth ad

或者,可以使用 --namespace/-n 参数(大数据群集名称)进行连接:Alternatively, you can connect using the --namespace/-n parameter, which is the big data cluster name:

kinit <username>@<domain name>
azdata login -n <clusterName> --auth ad

通过 AD 身份验证从 Windows 连接到控制器Connect to controller with AD authentication from Windows

azdata login -e https://<controller DNS name>:30080 --auth ad

对 Knox 网关使用 AD 身份验证 (webHDFS)Use AD authentication to Knox gateway (webHDFS)

还可以通过 Knox 网关终结点使用 curl 发出 HDFS 命令。You can also issue HDFS commands using curl through the Knox gateway endpoint. 这需要对 Knox 进行 AD 身份验证。That requires AD authentication to Knox. 以下 curl 命令通过 Knox 网关发出 webHDFS REST 调用,以创建名为 products 的目录The below curl command issues a webHDFS REST call through the Knox gateway to create a directory called products

curl -k -v --negotiate -u : https://<Gateway DNS name>:30443/gateway/default/webhdfs/v1/products?op=MKDIRS -X PUT

后续步骤Next steps

对 SQL Server 大数据群集 Active Directory 集成进行故障排除Troubleshoot SQL Server Big Data Cluster Active Directory integration

概念:在 Active Directory 模式下部署 SQL Server 大数据群集SQL Server Big Data ClustersConcept: deploy SQL Server 大数据群集SQL Server Big Data Clusters in Active Directory mode