Capturing MDX queries generated by SSAS frontends
Some tools allow you to write your own MDX queries, others will generate them for you. If you want to know what these other MDX queries look like, you need to use another tool which will tell you that. One such tool is the SQL Server Profiler which comes as a part of the SQL Server installation. Others might come as an add-in to the application that generates MDX queries.
In this recipe we're going to show how to capture the MDX query that has been sent by an application to the server using SQL Server Profiler.
Getting ready
In Microsoft SQL Server Management Studio for SQL Server 2012 SQL Server Profiler can be found in the Tools menu.
After starting the Profiler, we will start a new template by clicking on the File menu, Templates, and then choosing the New Template... item.
Select Microsoft SQL Server "2012" Analysis Services for the Server Type. Provide the name for the template: MDX queries
. If you rarely perform other activities in the...