简体   繁体   English

用于为SQL Server Reporting Services授予用户权限的SQL脚本

[英]SQL script to grant user permissions for SQL Server Reporting Services

I know I can do it via ip:port/Reports 我知道我可以通过ip:port / Reports来实现

Properties -> Security -> New Role Assignment-> "User Name" -> "Roles" 属性 - >安全性 - >新角色分配 - >“用户名” - >“角色”

However, I have many databases, each with a different users. 但是,我有许多数据库,每个数据库都有不同的用户。 So, I would like to automate the process and write an SQL script + double clicking a batch to do the process. 所以,我想自动化该过程并编写一个SQL脚本+双击批处理来完成该过程。 I have tried doing insert to users table and userrole table, but it doesn't seem to work, so I suppose it's something about permission granting that I cannot see with my bare eyes... Any hint on what to include in the SQL script? 我已经尝试过对用户表和userrole表进行插入,但它似乎没有用,所以我想这是关于权限授予我无法用眼睛看到的东西...任何提示要包含在SQL脚本中的内容?

I would not recommend using SQL scripts to modify RS catalog. 我不建议使用SQL脚本来修改RS目录。 Schema is undocumented and is quite complicated. Schema没有文档,非常复杂。

You can use SOAP API calls from RS Scripting Host. 您可以使用RS Scripting Host中的SOAP API调用。 Here is the pointer to sample script which assigns permissions http://msftrsprodsamples.codeplex.com/wikipage?title=SS2008%21Script%20Samples%20%28Reporting%20Services%29 以下是指向权限的示例脚本的指针http://msftrsprodsamples.codeplex.com/wikipage?title=SS2008%21Script%20Samples%20%28Reporting%20Services%29

Some information about scripting host http://technet.microsoft.com/en-us/library/ms162839.aspx 有关脚本主机的一些信息http://technet.microsoft.com/en-us/library/ms162839.aspx

I also recommend using user groups instead of individual user accounts. 我还建议使用用户组而不是单个用户帐户。 It is easier to maintain in the long run. 从长远来看,它更容易维护。

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

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