When I work with Reporting Services reports against OLAP cubes, I usually use the MDX Sample Application to write my mdx queries. And some of the things that annoy me is to always have to type in the server name to the Analysis Server. Last week I decided to figure out how to make it connect to a specific data source, instead of my local AS service.
Typing in "C:\Program Files\Microsoft Analysis Services\Bin\mdxsampl.exe" /? provided me with some clues as to what parameters I could use:
MDXSample Usage:
/C Connect to the given data source
/F Open the given query file
/R Run all queries in the specified file (requires /F and /C)
But I couldn't figure out how to use the /C parameter. Fortunately someone was helpful in Microsoft's OLAP news group, and told me to use it like this:
" C:\Program Files\Microsoft Analysis Services\Bin\mdxsampl.exe" /FMDXQuery.mdx /C " Provider=MSOLAP;Data Source=servername"
Adding /C " Provider=MSOLAP;Data Source=servername " to the end of the default shortcut in Windows will start the MDX Sample Application, and connect it to servername instead of the local service.