5

Is it possible to grant the datareader privileges to a SQL Server Database Role rather than a User?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Rory
  • 40,559
  • 52
  • 175
  • 261

2 Answers2

8

Using the GRANT command.

USE DBNAME;
GRANT SELECT TO RoleName;
GO
Serapth
  • 7,122
  • 4
  • 31
  • 39
  • Also, it might not let you grant to the built-in roles ("db_*") - at least, it won't through the UI. But you can grant to roles that you create. – GalacticCowboy Jun 10 '10 at 16:41
3

You could add your (user defined) database role to db_datareader as a role member, using the UI.

FvR
  • 31
  • 1
  • Through the GUI, view the properties of the Database Role 'db_datareader'. On the General tab, under 'Members of this role:', click 'Add...'. This dialog allows selection of either users or other database roles. – Real World IS Mar 04 '15 at 20:04