useful things about data, databases, data warehouse and related stuff. The opinions expressed in this blog are mine alone. They may not necessarily reflect that of my employers and customers - both past or present. The comments left by the reviewers are theirs alone and may not reflect my opinion whether implied or not. None of the advice is warranted to be free of errors and omission. Please use at your own risk and after thorough testing in your environment.
Wednesday, July 11, 2012
How to find all tables and views used in a SQL Server Analysis services cube?
Someone asked me today if there is an easy way to find all
tables, views used in a SSAS cube. You can always see XMLA file to find the
tables or check the data source view in the cube definition. But we have some cube
databases which have more than 100 tables and going through XMLA or DSV is time
Good thing is Microsoft provides DMVs explore metadata of a
cube database. Here is a sample query to get meta data for a cube
to the SSAS instance via SSMS.
paste the query below SELECT*FROM$SYSTEM.MDSCHEMA_DIMENSIONS
WHERE CUBE_NAME ='cube_name'AND
DIMENSION_NAME <> 'Measures'