I was actually asked for this or something similar in the past. If it isn't what you are looking for it may be something that can help your DBA.
--Declare temp tables
declare @accounts as table (Guid uniqueidentifier)
declare @roles as table (Guid uniqueidentifier)
declare @privileges as table (Guid uniqueidentifier, Name nvarchar (255), Description nvarchar (255), DisplayGroupGuid uniqueidentifier)
declare @privilegesAndAcount as table (Guid uniqueidentifier, Name nvarchar (255), Description nvarchar (255), DisplayGroupGuid uniqueidentifier, AccountGuid uniqueidentifier)
insert into @accounts
select Guid from vRM_Account
while exists (select top 1 1 from @accounts)
begin
declare @accountguid as uniqueidentifier = (select top 1 Guid from @accounts)
--Get all roles the user is a member of
insert into @roles
execute spGetTrusteeMembership @accountguid
--Loop through roles and populate data
while exists (select top 1 Guid from @roles)
begin
declare @roleGuid as nvarchar (50) = (select top 1 '{' + cast (Guid as nvarchar (50)) + '}' from @roles)
insert into @privileges
execute spGetEffectivePrivileges @roleGuid
insert into @privilegesAndAcount
select *, @accountguid from @privileges
delete from @privileges
delete from @roles where Guid = @roleGuid
end
delete from @accounts where Guid = @accountguid
end
--get results with the displaygroup added
select distinct a.Name Account, dg.NameRef DisplayGroupName , p.Name Privilege, p.Description
from @privilegesAndAcount p
join SecurityPrivilegeDisplayGroup dg on dg.Guid = p.DisplayGroupGuid
join vRM_Account_Item a on a.Guid = p.AccountGuid
order by 1, 4, 2