简体   繁体   English

SSAS:如何生成所有有权访问多维数据集的用户的 csv?

[英]SSAS : How to generate a csv of all the users having access to a cube?

I need to compare the users listed in a file with the users having access to a certain cube to check which to add and which to remove so it checks out.我需要将文件中列出的用户与有权访问某个多维数据集的用户进行比较,以检查要添加哪些内容以及要删除哪些内容,以便检查出来。 Problem is, there are about 1000 users, so I'm not gonna be able to do it one by one.问题是,大约有 1000 个用户,所以我无法一一完成。 Is there a quick way to generate a CSV of all the users of the cube so I can work some Python magic and get the overlap / difference easily ?有没有一种快速的方法来生成多维数据集所有用户的 CSV 文件,以便我可以使用一些 Python 魔法并轻松获得重叠/差异?

  • Connect to the Cube Server via SSMS.通过 SSMS 连接到 Cube Server。
  • Expand your cube展开你的立方体
  • Expand "Roles"展开“角色”
  • Right Click on "ReadOnly" >> "Script Role as" >> "CREATE TO" >> "New Query Editor Window" or "File..."右键单击“只读”>>“脚本角色”>>“创建到”>>“新建查询编辑器窗口”或“文件...”

在此处输入图片说明

  • Now you have a XML-File containing all the Users with access to your cube (One comment: if you/ your server admin are working with security groups and you don't have the rights to look into those security groups, then you need to reach out to him, so that he/she can give you the list of members of this security group).现在您有一个 XML 文件,其中包含所有有权访问您的多维数据集的用户(一条评论:如果您/您的服务器管理员正在使用安全组,而您无权查看这些安全组,那么您需要与他联系,以便他/她可以向您提供此安全组的成员列表)。

If you are not so much into querying XML-Files, here is a pretty simple workaround of how to get your list: - Go to your favourite Editor (Notepad++, etc.) and remove everything except the lines with < Name >.如果您不太喜欢查询 XML 文件,这里有一个非常简单的方法来获取您的列表: - 转到您最喜欢的编辑器(Notepad++ 等)并删除除带有 <Name> 的行之外的所有内容。

  • In Notepad++ that can easily be done by highlighting lines with "< Name >" (Press Search STRG+F, then go to highlight and activate "Set Bookmark")在 Notepad++ 中,可以通过使用“<名称>”突出显示行轻松完成(按搜索 STRG+F,然后转到突出显示并激活“设置书签”)
  • then go to "Search" >> "Bookmark" >> "Remove all lines without Bookmarks"然后转到“搜索”>>“书签”>>“删除所有没有书签的行”
  • Finally Search and Replace "< Name >" and "< / Name >" with "".最后用“”搜索并替换“<名称>”和“</名称>”。
  • Now you have your list without annoying XML-Content, which you can for example paste into Excel and compare it via a vlookup with your list or better: you insert both list in sql tables and compare them via sql现在您的列表没有烦人的 XML 内容,例如您可以将其粘贴到 Excel 中并通过 vlookup 将其与您的列表或更好的进行比较:您将两个列表插入 sql 表并通过 sql 进行比较

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM