I've been tasked with populating the description of all dimensions and measures in our analysis services cubes to then be able to pull this out as a report for the end user to have a data dictionary. The following code will be the basis of the report. Is it possible to run something similar to update the descriptions rather than manually doing this in BIDS and reprocessing? I thought using UPDATE DIMENSION MEMBER might do it, but can't get it to work.
REPLACE(REPLACE(CAST(DIMENSION_UNIQUE_NAME AS VARCHAR(100)),'[',''),']','') AS Dim_Name,
LEVEL_NAME AS Attribute_Name,
LEVEL_UNIQUE_NAME AS Dimension_Attribute_Level,
DESCRIPTION AS Description
'SELECT * FROM $SYSTEM.MDSCHEMA_LEVELS
WHERE CAST(CUBE_NAME AS VARCHAR(255))= 'X'
AND CAST([CATALOG_NAME] AS VARCHAR(255)) = 'X'