views:

8

answers:

1

Is setting

EXEC sp_addrolemember N'db_datareader', N'User'
EXEC sp_addrolemember N'db_datawriter', N'User'

Is the same as granting SELECT/INSERT/DELETE/UPDATE on all tables to User

GRANT SELECT ON  [Schema].[Table] TO [User]
GRANT INSERT ON  [Schema].[Table] TO [User]
GRANT DELETE ON  [Schema].[Table] TO [User]
GRANT UPDATE ON  [Schema].[Table] TO [User]
A: 

From MSDN (db_datawriter, db_datareader) :

Members of the db_datawriter fixed database role can add, delete, or change data in all user tables.

Members of the db_datareader fixed database role can run a SELECT statement against any table or view in the database.

So, the effect is the same, only easier to administer in the first case.

Oded