query SSAS to find if table is used in cubes

1.1k views Asked by At

I have an SSAS instance with a number of databases containing cubes. I need to check if given tables/dimensions are used in the cubes.Maybe this could do the job

SELECT [CATALOG_NAME] as [DATABASE],
CUBE_NAME AS [CUBE],DIMENSION_CAPTION AS [DIMENSION]
 FROM $system.MDSchema_Dimensions
WHERE CUBE_NAME  ='Adventure Works'
AND DIMENSION_CAPTION <> 'Measures'
ORDER BY DIMENSION_CAPTION

but how do i modify ti to run for all the databases in the instance (and all the cubes in each db)?

0

There are 0 answers