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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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”)