Trying to understand what is going on under the hood with a Tabular model is possible using the SSAS DISCOVER_OBJECT_MEMORY_USAGE Rowset – but the results aren’t going to win any prizes for accessibility. The mighty Kasper De Jonge had a crack at making it accessible back in 2012 using a PowerPivot model. However it didn’t help me filter down the way I wanted so I decided to up it a notch with a Tabular model on my Tabular model’s memory usage.
A Tabular Model on DISCOVER_OBJECT_MEMORY_USAGE
The main features of the Tabular model are:
- A Measure for Memory usage (kind of important)
- A Hierarchy for exploring the structure of the memory use
- An Attribute for the Model (so you can filter on just the model you want)
- An Attribute for the Model Object (e.g. Hierarchy, Column Storage, Data Sources, etc.)
- An Attribute to identify Server objects (such as Server Assemblies) vs Model objects
Before we get into the gnarly details, here’s a look at what comes out the other side:
What you get is the capacity to browse down the hierarchy and apply a few useful filters:
- Filter to the Model(s) you are interested in
- Filter for the type of Model Object (e.g. Column, Hierarchy) you want to focus on
- Filter for Server / Model level objects (largely useful for just getting rid of server level noise)
Things that work well, and not so well.
Actually, it mostly works pretty well. It cleans up most of the GUIDs that make navigation tricky, categorises objects usefully (for me, anyway) and the logic baked into the view that does most of the work is not too hard to follow.
The biggest problem is that the hierarchy of objects doesn’t always make sense – there seem to be Model level objects at the Server level with no attached model. This is probably more to do with my understanding of how the server handles certain objects.
However, I’m always happy to get some feedback on this and any suggestions – especially on how to categorise things properly – will be greatly appreciated.
How to get this in your environment
The solution comes in a few parts:
- SQL Table to hold the contents of DISCOVER_OBJECT_MEMORY_USAGE
- SSIS Package to extract the results from DISCOVER_OBJECT_MEMORY_USAGE into the table
- SQL View to translate, clean and categorise the output from DISCOVER_OBJECT_MEMORY_USAGE
- A Tabular model to help structure exploring the output
- An Excel spreadsheet to show the results
If you want to get this up and running, the pack here has everything you need. In order to install it do the following:
- Run the SQL script dmv_SSAS_Tabular_DISCOVER_OBJECT_MEMORY_USAGE.sql to create the destination table
- Run the SQL script vw_dmv_SSAS_Tabular_DISCOVER_OBJECT_MEMORY_USAGE.sql to create the translating view
- Run the SSIS package in the the SSAS_DMV project to load the table
- Deploy the SSAS project TabularObjectMemoryUsage to create the tabular model
- Open the spreadsheet ObjectMemoryUsage.xlsx to explore your results
Along the way in steps 1-5 you’ll have to set connections/configurations to ones that work for your environment.
Have fun playing!