Clear Cache XMLA for SSAS Multidimensional

I often use the following XMLA code to clear database/cube/measure group cache in SSAS Multidimensional when I do performance testing between different MDX queries or versions of the same database. I am posting it here so that I can find it easily in future. You can use it to clear the cache at the database, cube or measure group levels.

<ClearCache xmlns=”http://schemas.microsoft.com/analysisservices/2003/engine”&gt;

YourDBName

YourCubeName 

YourMeasureGroupName

</ClearCache>

If you need to clear the cache at Database level you don’t need the lines for Cube and Measure Group. Similarly if you are clearing the cache for the whole cube you don’t need the line for the measure group.

 

 

 

 

Advertisements

One thought on “Clear Cache XMLA for SSAS Multidimensional

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s