Search code examples
xmlssasolapddlxmla

Passing a parameter in XMLA


I have the following XMLA Script to add domain Users to a specific SSAS membership role. It works fine, but I need to work that in a loop. A table with all the Users will be filled from Active Directory. The question is how can I generate the tab <Member> </Member> for every User existent in my SQL Table or SSAS Dimension ? Or how can I parse every username from the table as a parameter in this XMLA-Tab?

enter image description here


Solution

  • I created a T-SQL script here which determines the current users and adds one over a linked server to SSAS. It shouldn't be hard to join to your table and use that as the source of members. You may not need ASSP if you don't care what members the role has currently.

    Here are steps on setting up the linked server: http://www.mssqltips.com/sqlservertip/2790/dynamic-xmla-using-tsql-for-sql-server-analysis-services/

    If you don't want to setup a linked server and install ASSP to do the above you could write some C# code that uses the AMO library to maintain the members.