I've been provided access to a cube and need to know if I can set up a stored procedure that can connect to a Cube and retrieve the contents (via an MDX Query). I need this to prevent having to export the data from the Management Studio or from Excel (via PowerPivot). I'm very new to cubes/olap queries so forgive any naivety I may show.
相关问题
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
The easiest way is to create a linked server to your cube and then INSERT..SELECT FROM OPENQUERY http://sqlblog.com/blogs/stacia_misner/archive/2010/11/30/31193.aspx
This option has limitations in that
An advanced option is the ExecuteOLAP CLR stored procedure https://olapextensions.codeplex.com/
If you choose to use OPENQUERY (easiest way, but having the limitations specified by Brian), the following procedure might be handy:
It provides the following advantages:
When profiling, I have noticed approx. 100ms overhead (execution through the procedure vs. direct execution against analysis server).
.NET developers can use ADOMD.NET framework, which allows running parameterized queries and having a smaller overhead.