Reputation: 40971
I would like to roll-up permissions. Is it possible to add a role as a member of another role in a Microsoft SQL Server 2016 database? If so, then how?
Upvotes: 6
Views: 6254
Reputation: 2651
Yes, it is possible. simply by using sp_addrolemember, or the GUI as you'd normally add a user to a role:
ALTER ROLE 'BigRole' ADD MEMBER 'LittleRole'
Note that SQL Server will prevent you from making a role a member of itself, so if "BigRole" is already a member of "LittleRole", the above will fail.
Upvotes: 8