namko
namko

Reputation: 647

What is the point of having roles in a SQL Server database?

As per my understanding each database user is assigned a role. Each role owns a certain schema. The point of role then is to determine which schema a database user has access to.

Why not just remove the role and associate users directly with schemas?

Upvotes: 0

Views: 101

Answers (1)

GMB
GMB

Reputation: 222472

Roles do not only manage the permissions at schema level. Roles are combinations of priviliege, that provide many other levels of control such as which user can access which database object (tables, procedures, ...), what type of queries it may execute (select, update, delete, insert), and so on.

Bottom line, roles give a flexible, fine-grained control over the way users access and use the database.

For more information see the sql-server documentation.

Upvotes: 1

Related Questions