Reading an SSAS cube thru SQL using MDX

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.  Well, then examine the code below to see how you could do this.

By the way, to do this, you also need a Linked server… and Stacia Misner does a great job of showing how to do that here…

So, here’s how you would do this…


Leave a Reply

Your email address will not be published. Required fields are marked *