本文介绍了用户分配了SQL azure角色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图确保已为所有用户分配了特定角色.是否有任何视图或SQL查询可获取此信息?
I am trying to make sure that all users have been assigned a particular role. Is there any view or SQL query for getting this information?
推荐答案
视图已更改名称,但以下内容应适用于SQL Azure
The views have changed names but the following should work against SQL Azure
select m.name as Member, r.name as Role
from sys.database_role_members
inner join sys.database_principals m on sys.database_role_members.member_principal_id = m.principal_id
inner join sys.database_principals r on sys.database_role_members.role_principal_id = r.principal_id
这篇关于用户分配了SQL azure角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!