SSAS : 数据访问接口整理汇总

本文介绍了Microsoft SQL Server 2005 Analysis Services (SSAS) 支持的数据访问技术,包括何时使用OLEDB Provider、如何使用ADOMD.NET以及在何种情况下选择XMLA。在非托管环境中如Excel,通常使用OLEDB;在托管环境中如.NET程序,选择ADOMD.NET;而在无法使用前两者时,如Java中,采用XMLA进行操作。所有的这些接口最终都基于XMLA协议进行通信。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Microsoft SQL Server 2005 Analysis Services (SSAS) supports several technologies that can be used to access data and metadata stored on an instance of Analysis Services. Using the Analysis Services data access technologies, you can do the following:

Retrieve Schema Rowsets

Schema rowsets are one way in which client applications can examine metadata stored on, and retrieve support and monitoring information from, an Analysis Services instance. You can retrieve OLE DB, OLE DB for Online Analytical Processing (OLAP), OLE DB for Data Mining, or XML for Analysis (XMLA) schema rowsets.

To retrieve schema rowsets:

  • You can use OLE DB commands with the Analysis Services 9.0 OLE DB provider. For more information, see Analysis Services 9.0 OLE DB Provider (SSAS).这是一个非托管的提供程序,msolap90.dll
  • You can run the XMLA Discover method directly against an Analysis Services instance to retrieve schema rowset information. For more information, see Discover Method (XMLA).
Retrieve Data and Metadata

You can retrieve data and metadata, in either tabular or multidimensional formats, from cubes and mining models.

To retrieve data and metadata:

  • You can use ADOMD.NET in a managed client application to retrieve Analysis Services information using common Microsoft .NET Framework data access interfaces. For more information, see ADOMD.NET.
  • You can use the Analysis Services 9.0 OLE DB provider in unmanaged client applications to support OLE DB access. For more information, see Analysis Services 9.0 OLE DB Provider (SSAS).
  • You can use XMLA to retrieve data directly from an Analysis Services instance in an XML-based format. For more information, see XML for Analysis (XMLA).
Manipulate Analysis Services Objects

You can manipulate Analysis Services objects, such as databases, cubes, dimensions, and mining structures, using Multidimensional Expressions (MDX), Data Mining Extensions (DMX), or XMLA commands.

To manipulate Analysis Services objects:

  • You can use ADOMD.NET in a managed client application to send commands using common .NET Framework data access interfaces. For more information, see ADOMD.NET.
  • You can use the Analysis Services 9.0 OLE DB provider in unmanaged client applications to send commands using OLE DB access. For more information, see Analysis Services 9.0 OLE DB Provider (SSAS).
  • You can use XMLA to send commands directly to an Analysis Services instance. For more information, see XML for Analysis (XMLA).

 

何时使用OLEDB Provider?

在非托管环境中,例如在Excel,就是使用OLEDB 的方式

如何使用OLEDB Provider?

image

它的连接字符串,大致如下

Provider=MSOLAP.4;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=Adventureworks;Data Source=(local);MDX Compatibility=1;Safety Options=2;MDX Missing Member Mode=Error

如何在VB或者VBA代码中使用,则需要先添加引用

image

image

 

何时使用ADOMD.NET ?

在托管环境中。例如.NET编写的程序。

如何使用ADOMD.NET?

image

 

何时使用XMLA?

在没有办法使用OLEDB以及ADOMD.NET的时候。例如在java中直接通过XML的方式来操作

通常都是发送下面这样的消息到服务器。当然,前提是服务器已经配置为可以使用http访问

http://schemas.xmlsoap.org/soap/envelope/">
 


    http://schemas.xmlsoap.org/soap/envelope/" xmlns:XA="urn:schemas-microsoft-com:xml-analysis" />
 

 
   
     
             
        SELECT [Customer].[Customer Geography].[Country-Region] ON 0,
[Measures].[Internet Sales-Sales Amount] ON 1
FROM [Analysis Services Tutorial]
     
     
       
        Adventureworks
          2052
         
          Multidimensional
          TupleFormat
          SchemaData
       
     
   
 

 

需要注意的是,OLEDB 和ADOME.NET其实也仍然是使用XMLA的,也就是SSAS通讯的官方语言就是XMLA,只不过:OLEDB 和ADOMD.NET所使用的XMLA是所谓的over TCP/IP的。

本文由作者: 陈希章 于 2009/6/27 9:11:20 发布在: http://www.cnblogs.com/chenxizhang/
本文版权归作者所有,可以转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
更多博客文章,以及作者对于博客引用方面的完整声明以及合作方面的政策,请参考以下站点: 陈希章的博客中心
本文是使用 博客同步和管理系统自动于2009/6/27 9:11:27 从 陈希章@博客园 同步过来的。原文地址: http://www.cnblogs.com/chenxizhang/archive/2009/06/27/1512111.html ,发表于2009/6/27 1:11:00.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值