用于连接到 Azure Analysis Services 的客户端库Client libraries for connecting to Azure Analysis Services

客户端应用程序和工具连接到 Analysis Services 服务器时需要使用客户端库。Client libraries are necessary for client applications and tools to connect to Analysis Services servers. Microsoft 客户端应用程序(例如 Power BI Desktop、Excel、SQL Server Management Studio (SSMS) 和 SQL Server Data Tools (SSDT))会安装全部三个客户端库并通过定期的应用程序更新来更新它们。Microsoft client applications like Power BI Desktop, Excel, SQL Server Management Studio (SSMS), and SQL Server Data Tools (SSDT) install all three client libraries and update them along with regular application updates. 在某些情况下,可能需要安装较新版本的客户端库。In some cases, you may need to install newer versions of the client libraries. 自定义客户端应用程序还需要安装客户端库。Custom client applications also require client libraries are installed.

下载最新客户端库 (Windows Installer)Download the latest client libraries (Windows Installer)

下载Download 产品版本Product version
MSOLAP (amd64)MSOLAP (amd64) 15.0.15.2615.0.15.26
MSOLAP (x86)MSOLAP (x86) 15.0.15.2615.0.15.26
AMOAMO 15.17.1.015.17.1.0
ADOMDADOMD 15.17.1.015.17.1.0

AMO 和 ADOMD(NuGet 包)AMO and ADOMD (NuGet packages)

Analysis Services Management Objects (AMO) 和 ADOMD 客户端库在 NuGet.org 上作为可安装的程序包提供。建议你迁移到 NuGet 引用而非使用 Windows Installer。Analysis Services Management Objects (AMO) and ADOMD client libraries are available as installable packages from NuGet.org. It's recommended you migrate to NuGet references instead of using Windows Installer.

程序包Package 产品版本Product version
AMOAMO 15.17.115.17.1
ADOMDADOMD 15.17.115.17.1

NuGet 包程序集 AssemblyVersion 遵循语义版本控制:MAJOR.MINOR.PATCH。NuGet package assemblies AssemblyVersion follow semantic versioning: MAJOR.MINOR.PATCH. NuGet 引用加载预期的版本,即使 GAC 中存在不同的版本(由 MSI 安装导致的)。NuGet references load the expected version even if there is a different version in the GAC (resulting from MSI install). PATCH 将随每次发布递增。PATCH is incremented for each release. AMO 和 ADOMD 版本保持同步。AMO and ADOMD versions are kept in-sync.

了解客户端库Understanding client libraries

Analysis Services 利用三个客户端库(也称为数据提供程序)。Analysis Services utilize three client libraries, also known as data providers. ADOMD.NET 和 Analysis Services 管理对象 (AMO) 都是托管型客户端库。ADOMD.NET and Analysis Services Management Objects (AMO) are managed client libraries. Analysis Services OLE DB 提供程序 (MSOLAP DLL) 是本机客户端库。The Analysis Services OLE DB Provider (MSOLAP DLL) is a native client library. 通常,所有这三个客户端库会同时安装。Typically, all three are installed at the same time. Azure Analysis Services 要求安装所有三个库的最新版本Azure Analysis Services requires the latest versions of all three libraries.

Microsoft 客户端应用程序(例如 Power BI Desktop 和 Excel)会安装所有这三个客户端库,有新版本可用时,会更新这些库。Microsoft client applications like Power BI Desktop and Excel install all three client libraries and update them when new versions are available. 某些客户端库可能不是 Azure Analysis Services 所需要的最新版本,具体取决于更新的版本或频率。Depending on the version or frequency of updates, some client libraries may not be the latest versions required by Azure Analysis Services. 这同样适用于自定义应用程序或其他接口,例如 AsCmd、TOM、ADOMD.NET。The same applies to custom applications or other interfaces such as AsCmd, TOM, ADOMD.NET. 这些应用程序需要手动或以编程方式安装库。These applications require manually or programmatically installing the libraries. 用于手动安装的客户端库作为可分发包包含在 SQL Server 功能包中。The client libraries for manual installation are included in SQL Server feature packs as distributable packages. 但是,这些客户端库与 SQL Server 版本关联,可能不是最新的。However, these client libraries are tied to the SQL Server version and may not be the latest.

用于客户端连接的客户端库不同于从 Azure Analysis Services 服务器连接到数据源时所需的数据提供程序。Client libraries for client connections are different from data providers required to connect from an Azure Analysis Services server to a data source. 若要详细了解数据源连接,请参阅数据源连接To learn more about datasource connections, see Datasource connections.

客户端库类型Client library types

Analysis Services OLE DB 提供程序 (MSOLAP)Analysis Services OLE DB Provider (MSOLAP)

Analysis Services OLE DB 提供程序 (MSOLAP) 是用于建立 Analysis Services 数据库连接的本机客户端库。Analysis Services OLE DB Provider (MSOLAP) is the native client library for Analysis Services database connections. ADOMD.NET 和 AMO 间接使用它向数据提供程序委托连接请求。It's used indirectly by both ADOMD.NET and AMO, delegating connection requests to the data provider. 也可以直接从应用程序代码调用 OLE DB 提供程序。You can also call the OLE DB Provider directly from application code.

用于访问 Analysis Services 数据库的大多数工具和客户端应用程序可自动安装 Analysis Services OLE DB 提供程序。The Analysis Services OLE DB Provider is installed automatically by most tools and client applications used to access Analysis Services databases. 必须将它安装在用于访问 Analysis Services 数据的计算机上。It must be installed on computers used to access Analysis Services data.

OLE DB 提供程序通常在连接字符串中指定。OLE DB providers are often specified in connection strings. Analysis Services 连接字符串使用不同的命名法来引用 OLE DB 提供程序:MSOLAP.<版本>.dll。An Analysis Services connection string uses a different nomenclature to refer to the OLE DB Provider: MSOLAP.<version>.dll.

AMOAMO

AMO 是用于服务器管理和数据定义的托管客户端库。AMO is a managed client library used for server administration and data definition. 它由工具和客户端应用程序安装和使用。It's installed and used by tools and client applications. 例如,SQL Server Management Studio (SSMS) 使用 AMO 连接到 Analysis Services。For example, SQL Server Management Studio (SSMS) uses AMO to connect to Analysis Services. 使用 AMO 的连接通常非常精简,由 "data source=\<servername>" 组成。A connection using AMO is typically minimal, consisting of "data source=\<servername>". 建立连接后,可以使用 API 来处理数据库集合和主要对象。After a connection is established, you use the API to work with database collections and major objects. SSDT 和 SSMS 都使用 AMO 连接到 Analysis Services 实例。Both SSDT and SSMS use AMO to connect to an Analysis Services instance.

ADOMDADOMD

ADOMD.NET 是用于查询 Analysis Services 数据的托管数据客户端库。ADOMD.NET is a managed data client library used for querying Analysis Services data. 它由工具和客户端应用程序安装和使用。It's installed and used by tools and client applications.

连接到数据库时,所有三个库的连接字符串属性相似。When connecting to a database, the connection string properties for all three libraries are similar. 使用 Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectionString 为 ADOMD.NET 定义的几乎任何连接字符串同样适用于 AMO 和 Analysis Services OLE DB 提供程序 (MSOLAP)。Almost any connection string you define for ADOMD.NET by using Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectionString also works for AMO and the Analysis Services OLE DB Provider (MSOLAP). 若要了解详细信息,请参阅连接字符串属性 (Analysis Services)To learn more, see Connection string properties (Analysis Services).

如何确定客户端库版本How to determine client library version

OLEDDB (MSOLAP)OLEDDB (MSOLAP)

  1. 转到 C:\Program Files\Microsoft Analysis Services\AS OLEDB\Go to C:\Program Files\Microsoft Analysis Services\AS OLEDB\. 如果有多个文件夹,请选择较大的数字。If you have more than one folder, choose the higher number.

  2. 右键单击“msolap.dll” > “属性” > “详细信息”。Right-click msolap.dll > Properties > Details. 如果文件名为 msolap140.dll,则它早于最新版本并且应当升级。If the filename is msolap140.dll, it's older than latest version and should be upgraded.

    客户端库详细信息

AMOAMO

  1. 转到 C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.AnalysisServices\Go to C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.AnalysisServices\. 如果有多个文件夹,请选择较大的数字。If you have more than one folder, choose the higher number.
  2. 右键单击“Microsoft.AnalysisServices” > ,选择“属性” > “详细信息”。Right-click Microsoft.AnalysisServices > Properties > Details.

ADOMDADOMD

  1. 转到 C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.AnalysisServices.AdomdClient\Go to C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.AnalysisServices.AdomdClient\. 如果有多个文件夹,请选择较大的数字。If you have more than one folder, choose the higher number.
  2. 右键单击“Microsoft.AnalysisServices.AdomdClient” > ,选择“属性” > “详细信息”。Right-click Microsoft.AnalysisServices.AdomdClient > Properties > Details.

后续步骤Next steps

使用 Excel 进行连接 Connect with Excel
使用 Power BI 进行连接Connect with Power BI