连接到服务器Connecting to servers

本文介绍如何通过将数据建模和管理应用程序(例如 SQL Server Management Studio (SSMS) 或 Visual Studio)与 Analysis Services 项目或客户端报告应用程序(例如Microsoft Excel、Power BI Desktop 或自定义应用程序)一起使用来连接服务器。This article describes connecting to a server by using data modeling and management applications like SQL Server Management Studio (SSMS) or Visual Studio with Analysis Services projects, or with client reporting applications like Microsoft Excel, Power BI Desktop, or custom applications. 使用 HTTPS 连接到 Azure Analysis Services。Connections to Azure Analysis Services use HTTPS.

客户端库Client libraries

获取最新的客户端库Get the latest Client libraries

与服务器的所有连接(无论连接类型)都需要更新后的 AMO、ADOMD.NET 和 OLEDB 客户端库才能连接到 Analysis Services 服务器。All connections to a server, regardless of type, require updated AMO, ADOMD.NET, and OLEDB client libraries to connect to and interface with an Analysis Services server. 对于 SSMS、Visual Studio、Excel 2016 及更高版本和 Power BI,最新的客户端库会与每月发布一起安装或更新。For SSMS, Visual Studio, Excel 2016 and later, and Power BI, the latest client libraries are installed or updated with monthly releases. 但是在某些情况下,应用程序可能不是最新版本。However, in some cases, it's possible an application may not have the latest. 例如,当策略延迟更新或 Office 365 更新在延期频道上时。For example, when policies delay updates, or Office 365 updates are on the Deferred Channel.

备注

客户端库无法通过需要用户名和密码的代理服务器连接到 Azure Analysis Services。The client libraries cannot connect to Azure Analysis Services through proxy servers that require a username and password.

服务器名称Server name

在 Azure 中创建 Analysis Services 服务器时,可以指定唯一名称以及要在其中创建服务器的区域。When you create an Analysis Services server in Azure, you specify a unique name and the region where the server is to be created. 在连接中指定服务器名称时,服务器命名方案为:When specifying the server name in a connection, the server naming scheme is:

<protocol>://<region>/<servername>

其中,协议是字符串 asazure,区域是在其中创建服务器的 URI(例如 chinanorth.asazure.chinacloudapi.cn),服务器名称是该区域中的唯一服务器名称。Where protocol is string asazure, region is the Uri where the server was created (for example, chinanorth.asazure.chinacloudapi.cn) and servername is the name of your unique server within the region.

获取服务器名称Get the server name

Azure 门户中,单击“服务器”>“概述” > “服务器名称”,并复制整个服务器名称。In Azure portal > server > Overview > Server name, copy the entire server name. 如果组织中的其他用户也要连接此服务器,则可以将此服务器名称与他们共享。If other users in your organization are connecting to this server too, you can share this server name with them. 指定服务器名称时,必须使用完整路径。When specifying a server name, the entire path must be used.

在 Azure 中获取服务器名称

连接字符串Connection string

使用表格对象模型连接到 Azure Analysis Services 时,使用以下连接字符串格式:When connecting to Azure Analysis Services using the Tabular Object Model, use the following connection string formats:

集成的 Azure Active Directory 身份验证Integrated Azure Active Directory authentication

集成的身份验证将选取 Azure Active Directory 凭据缓存(如果可用)。Integrated authentication picks up the Azure Active Directory credential cache if available. 如果不可用,则会显示 Azure 登录窗口。If not, the Azure login window is shown.

"Provider=MSOLAP;Data Source=<Azure AS instance name>;"
使用用户名和密码进行 Azure Active Directory 身份验证Azure Active Directory authentication with username and password
"Provider=MSOLAP;Data Source=<Azure AS instance name>;User ID=<user name>;Password=<password>;Persist Security Info=True; Impersonation Level=Impersonate;";
Windows 身份验证(集成安全性)Windows authentication (Integrated security)

使用运行当前进程的 Windows 帐户。Use the Windows account running the current process.

"Provider=MSOLAP;Data Source=<Azure AS instance name>; Integrated Security=SSPI;Persist Security Info=True;"

使用 .odc 文件进行连接Connect using an .odc file

在较旧版本的 Excel 中,用户可以使用 Office 数据连接 (.odc) 文件连接到 Azure Analysis Services 服务器。With older versions of Excel, users can connect to an Azure Analysis Services server by using an Office Data Connection (.odc) file. 若要了解详细信息,请参阅创建 Office 数据连接 (.odc) 文件To learn more, see Create an Office Data Connection (.odc) file.

后续步骤Next steps

使用 Excel 进行连接 Connect with Excel
使用 Power BI 进行连接 Connect with Power BI
管理服务器Manage your server