码迷,mamicode.com
首页 > 其他好文 > 详细

SharePoint中取得ACL和组中用户数量

时间:2014-10-18 15:33:51      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:sharepoint

                 SharePoint中取得ACL和组中用户数量


1. 取得ACL的数量:

select COUNT(ra.PrincipalId) as [Count],p.ScopeUrl
from [WSS_Content_80].[dbo].[RoleAssignment] ra with(nolock)
join [WSS_Content_80].[dbo].[Perms] p with(nolock) on p.SiteId = ra.SiteId and p.ScopeId = ra.ScopeId
group by p.ScopeUrl
order by [Count] desc


2. 取得组中用户的数量:

select COUNT(m.MemberId) as [Count], g.Title as [Group-Title]
from [WSS_Content_80].[dbo].[GroupMembership] m with(nolock)
join [WSS_Content_80].[dbo].[Groups] g with(nolock) on m.GroupId = g.ID and m.SiteId = g.SiteId
group by g.Title

order by [Count] desc

SharePoint中取得ACL和组中用户数量

标签:sharepoint

原文地址:http://blog.csdn.net/gihow/article/details/40211503

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!