MDX-How to execute query from SQL Server
Q: Can I execute MDX Query from SQL Server?
A: In SQL Server you can create linked server to analysis services :
@server='<LinkedServerName>', -- THat is name that you will call this new server
@datasrc='<ASServer>', -- This is the name of the Analysis Services server.
@catalog='<ASDB>' -- This is the Analysis Services database against which you query.
Alternatively you can use OpenQuery function.
Make sure you read KB article : http://support.microsoft.com/kb/925869