Do you need the ability to read a cube, but you want to read it thru SQL? And, why would you do this? Well, for example, suppose you wanted to email the results of a certain MDX query…and you didn’t want to set up SSRS to do this. (SSRS would be a fine method, but you do have to set it up and create the report etc.) Suppose you were simply more comfortable using a SQL Server Agent job to do this task for you. Continue reading “Reading an SSAS cube thru SQL using MDX”
ASSP.dll…super great functionality
There is a “DLL” that you are going to want to install on your SSAS servers… it is called “ASSP.DLL”…and you can get it from Code plex. To quote CodePlex:
The Analysis Services Stored Procedure project is a set of sample stored procedures for Analysis Services 2005, 2008, 2008 R2, and 2012. These samples have been written in C# and sample MDX queries are included that demonstrate the use of the procedures against the Adventure Works DW sample database. It was developed by a group of community volunteers with 2 main aims in mind:
- To provide a set of useful extensions to Analysis Services 2005 and higher.
- To provide a variety of example source code for people looking to write their own stored procedures.
So, go to CodePlex, follow their instructions and install the DLL on your server. After that is done, you can try the code below…