Re: DISCOVER_XML_METADATA



Check out this section from this page:
http://msdn2.microsoft.com/zh-cn/library/ms127747.aspx

--------------------
The ObjectExpansion restriction can be used to control the degree of
expansion of ASSL XML returned by the server. This restriction has the
options listed in the following table.
Enumeration value Allowed for <Alter> Description
ReferenceOnly
no
Returns only the name, ID, and timestamp for the requested object and
for all contained major objects recursively.

ObjectProperties
yes
Expands the requested object and minor contained objects, but does not
return major contained objects.

ExpandObject
no
Same as ObjectProperties, but also returns the name, ID, and timestamp
for contained major objects.

ExpandFull
yes
Fully expands the requested object and all contained objects
recursively.

--------------------

You could do ExpandObject for the server in step 1. Then for each database
returned, you could request ExpandObject for that database -- this is step
2. This would return the Cube IDs/Names under the database -- but
unfortunately you can't avoid getting all the other major objects under the
database also.

Each step does return you a lot more information than you are apparently
interested in. But it is much better than doing ExpandFull...

Thanks,
Akshai
--
Try out the MSDN Forums for Analysis Services at:
http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=83&SiteID=1

This posting is provided "AS IS" with no warranties, and confers no rights
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.

"alextt" <alextt@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:95B0E5FE-E944-493C-824F-128B6D6CE4B4@xxxxxxxxxxxxxxxx
Thanks Akshai for your time for tyring to solve my problem.

How can I use <ObjectExpansion> property to get the list of all database
and
all cubes (for each database) and nothing else. No dimensions, no
Measures -
nothing else. Or at least minimum that I can get? ExpandObject is still
masive list...
Thanks


"Akshai Mirchandani [MS]" wrote:

Why do you *need* to use ExpandFull? And if you actually need all the
metadata then what is the problem?

DISCOVER_XML_METADATA allows you get at all the metadata of objects --
the
ObjectExpansion options allow you to limit how much detail you get back.
You
can also fetch metadata on a per-major-object basis.

Thanks,
Akshai
--
Try out the MSDN Forums for Analysis Services at:
http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=83&SiteID=1

This posting is provided "AS IS" with no warranties, and confers no
rights
Please do not send email directly to this alias. This alias is for
newsgroup
purposes only.

"alextt" <alextt@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6CA74716-D164-4980-BB40-B64680B5B4D9@xxxxxxxxxxxxxxxx
Thanks all for you help. I need to find another way.
DISCOVER_XML_METADATA
is
very powerfull and I need to find the way to import XML result somehow
into
SQL server table.

Small XML is not problem. I can use:

<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>DBSCHEMA_CATALOGS</RequestType>
<Restrictions>
<RestrictionList/>
</Restrictions>
<Properties>
<PropertyList>
</PropertyList>
</Properties>
</Discover>

and then run following for each database:

<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>MDSCHEMA_CUBES</RequestType>
<Restrictions>
</Restrictions>
<Properties>
<PropertyList>
<Catalog>$(DATABASENAME)</Catalog>
<Format>Tabular</Format>
</PropertyList>
</Properties>
</Discover>

and import XML result into SQL using OPENXML but that is not enough
information for me. I need to use DISCOVER_XML_METADATA with EXPANDFull
and
import everything into SQL table. Please help if you have time and if
you
know the answer.


"Akshai Mirchandani [MS]" wrote:

You should be looking at the ObjectExpansion restriction. Have you
looked
at
the options ReferenceOnly and ExpandObject?

You may need to send more requests but that is a much more scalable
solution.

Thanks,
Akshai
--
Try out the MSDN Forums for Analysis Services at:
http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=83&SiteID=1

This posting is provided "AS IS" with no warranties, and confers no
rights
Please do not send email directly to this alias. This alias is for
newsgroup
purposes only.

"alextt" <alextt@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:68FFC8FC-E91C-4FE3-84FB-723CD0FA02D3@xxxxxxxxxxxxxxxx
Thanks Darren for your help.

There is a small problem with DBSCHEMA_CATALOGS - it doesn't list
unprocessed cubes and it doesn't show processing status information
about
cubes. Unfortunately, DISCOVER_XML_METADATA is the only solution for
me.
Thanks

"Darren Gosbell" wrote:

I can't think of any way of getting just dimensions and cubes in a
single XMLA query. So apart from using XSLT to strip out just what
you
need, the other option would be to do multiple queries.

A DBSCHEMA_CATALOGS query will get you a list of all the databases
eg.

<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>DBSCHEMA_CATALOGS</RequestType>
<Restrictions />
<Properties />
</Discover>

Then for each database you could run an MDSCHEMA_CUBES query to get
a
list of cubes.
eg.

<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>MDSCHEMA_CUBES</RequestType>
<Restrictions />

<Properties>
<PropertyList>
<Catalog>Adventure Works DW</Catalog>
</PropertyList>
</Properties>
</Discover>

If you are using these queries to populate a UI, the multiple query
approach could work quite nicely as normally you would "drill down"
from
the database list to the list of cubes for a selected database. You
will
also find the more specific queries MUCH faster than a
DISCOVER_XML_METADATA query.

--
Regards
Darren Gosbell - SQL Server MVP
Blog: http://www.geekswithblogs.net/darrengosbell

In article <61BD8102-B77F-430A-AC99-5DF87CEA6EFA@xxxxxxxxxxxxx>,
alextt@xxxxxxxxxxxxxxxxxxxxxxxxx says...
I'm using following code to get list and properties of all
objects
in
my
Analysis Server.

<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>DISCOVER_XML_METADATA</RequestType>
<Restrictions>
<RestrictionList>
<ObjectExpansion>ExpandFull</ObjectExpansion>
</RestrictionList>
</Restrictions>
<Properties>
<PropertyList>
</PropertyList>
</Properties>
</Discover>


The XML fresult is too long and I don't need eveything (e.g.
dimension
properties) in my XML result file. My question is how to exclude
unwanted
(levels, attributes or properties) in my XMLA query and get only
the
list of
only Databases and Cubes available on my server. In that case XML
file
will
be smaller and contain only the data that I need.

Thanks

and I hope this post will help many others.











.



Relevant Pages

  • Re: Issue with Migrating OLAP Cube
    ... > uat server, but the underlying SQL database differs. ... > I tried your #2 using my AS dbname1 on my dev machine. ... I copy those same cubes from ...
    (microsoft.public.sqlserver.olap)
  • Re: DISCOVER_XML_METADATA
    ... Small XML is not problem. ... and then run following for each database: ... unprocessed cubes and it doesn't show processing status information ... A DBSCHEMA_CATALOGS query will get you a list of all the databases ...
    (microsoft.public.sqlserver.olap)
  • Is FOR XML EXPLICIT still an accepted technique?
    ... I have inherited an ASP IIS site attached to a SQL ... Server 2000 database. ... I am new at using XML and have done considerable reading. ...
    (microsoft.public.sqlserver.xml)
  • Re: Communicate XML between SPs
    ... --Load and parse the XML document in Memory ... exec testXMLInsert @idoc ... Now that you mentioned the Server is same, but have 2 seperate DBs, ... XML to send data from the SQL Server 2000 database to the remote ...
    (microsoft.public.sqlserver.xml)
  • Re: XML->Dataset->Database
    ... latest configuration information and the server contains completed survey ... special database tables to control the flow of information, and using XML ... based on what needs to be sent to the client, ...
    (microsoft.public.dotnet.general)