ssasxmladmv

Discovering partition names SSAS


Is there a way I can dynamically discover if a partition with a specific name already exists in my cube using DMV or XMLA?

Thanks


Solution

  • There is no DMV that lists this information. You would have to issue a DISCOVER_XML_METADATA request and parse through the returned XMLA which will be in a similar format to what you get when you script an object definition.

    If you don't mind using an external assembly there is a function in the assembly at http://asstoredprocedures.codeplex.com called DiscoverXmlMetadata which can do this.

    The following query will return a list of all the partitions in the database

    call assp.DiscoverXmlMetadata("Partition")