Chapter 21



In this chapter, we’ll introduce the concept of roles. By the end of the chapter, you should have a good understanding of how to use roles to grant access in SQL server. We’ll cover how and when to use roles. We’ll show you how to create a role and add users to the role via the GUI and via script.


Roles in SQL Server 2005 are a lot like groups in Windows. Their primary use is to allow an easy method of assigning permissions to a group of users. Roles can have built-in (predefined by SQL Server 2005) or user-defined permissions, and exist at both the server and database level. Most built-in roles cannot be modified, with the ...

Get The Best Damn Exchange, SQL and IIS Book Period now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.