SQL Server › SQL Server Security & Permissions

How do database roles help simplify managing permissions for multiple users with similar access needs?

Intermediate

Answer

A database role lets you group together a specific set of permissions once, and then simply add or remove individual users from that role to grant or revoke that entire set of permissions, rather than needing to manage granular permissions separately for every individual user, making permission management much more consistent and easier to audit.
CREATE ROLE ReportViewers;
GRANT SELECT ON SCHEMA::Reporting TO ReportViewers;
ALTER ROLE ReportViewers ADD MEMBER SalesUser;
Real-world example A company creates a ReportViewers role granting read access to their reporting schema, then simply adds each new employee who needs reporting access to that role, rather than manually granting the same set of permissions to each person individually.

Common follow-ups: What is the difference between a fixed database role and a custom database role?;How do you see which users currently belong to a specific role?