Monday 18 April 2011

Run MDX Queries Under Specific Roles

I wanted to run some MDX queries under specific roles.  When you browse a cube in SQL Server Management Studio (SSMS), you can change your security context by using the Change User botton (1st one from the left):

Then pick the roles:



But there is no such button when you run MDX queries in SSMS.  So how do you do it?  As it turns out you can change the connection properties and add connection string parameters, as shown below:


Note that in order for this to work you need to be a server admin on SSAS.

No comments: