共用方式為


Discover 方法 (XMLA)

從 Microsoft SQL Server Analysis Services 的執行個體中擷取資訊,例如可用資料庫的清單或有關特定物件的詳細資料。使用 Discover 方法所擷取的資料取決於傳遞給它的參數值。

**命名空間:**urn:schemas-microsoft-com:xml-analysis

SOAP 動作:"urn:schemas-microsoft-com:xml-analysis:Discover"

語法

<Discover>
   <RequestType>...</RequestType>
   <Restrictions>...</Restrictions>
   <Properties>...</Properties>
</Discover>

元素特性

特性

描述

資料類型和長度

預設值

基數

0-1: 只能出現一次的選擇性元素。

元素關聯性

關聯性

元素

父元素

子元素

PropertiesRequestTypeRestrictions

備註

Discover 方法會要求有關 Analysis Services 執行個體和物件的中繼資料。中繼資料是使用 XMLA Rowset 資料類型傳回的。

範例

在下列程式碼範例中,用戶端會傳送 Discover 呼叫,以便從 Adventure Works DW 範例 Analysis Services 資料庫中要求 Cube 清單。

<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
   <RequestType>MDSCHEMA_CUBES</RequestType>
   <Restrictions>
      <RestrictionList>
         <CATALOG_NAME>Adventure Works DW</CATALOG_NAME>
      </RestrictionList>
   </Restrictions>
   <Properties>
      <PropertyList>
         <DataSourceInfo>Provider=MSOLAP;Data Source=local;</DataSourceInfo>
         <Catalog>Adventure Works DW</Catalog>
         <Format>Tabular</Format>
      </PropertyList>
   </Properties>
</Discover>