Reputation: 65506
When Browsing an MS OLAP cube in SQL Server Management Studio I'm able to click on the change user button to change the user that I view the cube as. This let me test security access to various parts of the data.
I was wondering if it's possible to do this in the connection string also? As far as I understand it I can change the Roles property in the connection string, but as the data is locked from particular person's perspective this doesn't help. Also the cube uses windows security so a specific user and password combo aren't going to help either.
Upvotes: 2
Views: 3047
Reputation: 1836
Yes, through the following property in your connection string:
EffectiveUserName=DOMAIN\UserName
This will only work if you're an SSAS administrator.
Upvotes: 2
Reputation: 353
in your ConnectionString you can use CustomData="Username"
and After that you can used it like UserName()
Function.
PLEASE See this link for more information about CustomData()
http://www.mdxpert.com/Functions/MDXFunction.aspx?f=154
Upvotes: 1