tags:

views:

59

answers:

2

When I try to drill down into a cube in our client application, I use xmlaclient.Discover method to discover the SSAS metadata. When I've drilled down to the about the 7th level I get a system out of memory exception. The stack trace is as below- This is running on a Windows 2008 server, 2008 ssas server and the application is on a windows 7 machine (all 64 bit) and both the machines have 4gb of Ram.

StackTrace " at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity)\r\n at System.Text.StringBuilder.GetNewString(String currentString, Int32 requiredLength)\r\n at System.Text.StringBuilder.Append(String value)\r\n at System.IO.StringWriter.Write(String value)\r\n at System.Xml.XmlTextWriter.InternalWriteEndElement(Boolean longFormat)\r\n at System.Xml.XmlTextWriter.WriteFullEndElement()\r\n at System.Xml.XmlReader.WriteNode(XmlTextWriter xtw, Boolean defattr)\r\n at System.Xml.XmlReader.ReadInnerXml()\r\n at Microsoft.AnalysisServices.Xmla.XmlaReader.ReadInnerXml()\r\n at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessageAndReturnResult(String& result, Boolean skipResult)\r\n at Microsoft.AnalysisServices.Xmla.XmlaClient.Discover(String requestType, String restrictions, String properties, String& result, Boolean skipResult, Boolean restrictionsXmlIsComplete, Boolean propertiesXmlIsComplete)\r\n at Meridium.XMLA.Client.XmlaClientCall.XmlaDiscover(String Discover_type, String restrictions, String properties, Boolean isRestrictionsComplete, Boolean isPropertiesComplete) in C:\MyData\Projects\APM V3\Source\Meridium\Metrics\XMLA\Client\XmlaClientCall.cs:line 44" string

A: 

I tried applying the cumulative 4 update on sql server, but didn't find any difference. Does anyone know why using Xmlaclient.Discover method throw a system out of memory exception? The class is undocumented hence a little hard to debug as well.

Thanks, Nikhil

Nikhil
Does anybody have some other ideas?
Nikhil
A: 

Found the problem and a solution: The Microsoft.AnalysisServices.Xmla.dll assembly is both undocumented and unsupported.

The supported method for doing this would be to use the Microsoft.AnalysisServices.AdomdClient.dll assembly using the GetSchemaDataSet method and pass AdomdSchemaGuid.Members as the first parameter and the appropriate restriction object as the second parameter.

If using the earlier one, we need to create member unique name restriction and a tree_op restriction to prevent the memory footprint from growing further.

Nikhil

Nikhil