MetaCube is a tool that can be used to read the SQL Server Analysis Server Objects using AMO assemblies and map each object to the related directory and configuration files located in the server data directory (DataDir property).
You can use the Classes within your own solution or you can use the application as a tool.
SSAS Data directory contents hierarchy
After building many multidimensional Cube using SSAS, i can assume that the following tree is the Data directory hierarchy:
|-DataDirectory
|-Database(.db)
|-Dimension(.dim)
|-Role(.role)
|-MiningStructure(.dms)
|-DataSource(.ds)
|-DataSourceView(.dsv)
|-MultidimensionalCube(.cub)
|-MeasureGroup(.det)
|-Partition(.prt)
|-AggregationDesign(.agg)
Each object from the tree above can be stored in form of a directory or/and an XML file.
The Actions and Kpis information are stored within the Cube XML configuration file.
Example:
Object: Cube
Directory: <DataDir>\<database>\<cube ID>.cub\
XML file: <DataDir>\<database>\<cube ID>.cub.xml
Link SSAS AMO objects to data directory files
Reading data using AMO
To read SSAS object from deployed Analysis Cube, i improved the code of the following project to add more objects and to link them with the relevant directories/files.
To map every AMO object to the relevant directory/XML file we have to loop over objects starting from top level (database) and retrieve the files/directories found in each level and map it using the