• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

cynchanpin

  • 博客园
  • 联系
  • 订阅
  • 管理

View Post

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

                 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

posted on 2017-07-17 11:17  cynchanpin  阅读(163)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3