最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

sql server - Get a list of all attributeshierarchies (both enabled and disabled) of all dimensions of a cube - Stack Overflow

programmeradmin2浏览0评论

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.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论