I need a way to obtain a list of all attributes / hierarchies of all dimensions of a given cube. In the Internet I have found that following SSAS DMV for doing a similar job:
SELECT [CATALOG_NAME] as [DATABASE],
CUBE_NAME AS [CUBE],
[DIMENSION_UNIQUE_NAME] AS [DIMENSION],
HIERARCHY_DISPLAY_FOLDER AS [FOLDER],
HIERARCHY_CAPTION AS [DIMENSION ATTRIBUTE],
HIERARCHY_IS_VISIBLE AS [VISIBLE]
FROM $system.MDSchema_hierarchies
WHERE CUBE_NAME ='MyCube' AND HIERARCHY_ORIGIN=2
ORDER BY [DIMENSION_UNIQUE_NAME];
However, this DMV script only displays attributes or hierarchies that are enabled; but in my case I need also disabled ones (i.e. their AttributeHierarchyEnabled = FALSE) to be displayed. I am using Microsoft SQL Server 2008 R2. Please advise how I could do this. Many thanks in advance.