Sunday, February 19, 2012

Giving someone read-only access to a database -- beginner question

Sorry for the simple question, but I'm not having any luck getting this to work: I need to give someone read-only access to everything in a database.

If someone could help me by giving me (or linking me to) a step-by-step, idiot-proof recipe for giving Bob in my office read-only access to the whole database, I'd be very grateful. And remember: I'm good at db programming, but completely ignorant on the subject of db admin.

Using the SQL Server Management Studio, in the Object Explorer, find and 'expand' the Security tab, click on Logins.

Locate Bob if he is listed. If he is not listed, then right click on Logins, and select 'New Login' and follow the instructions.

Once Bob is listed, right-click on his login, and select [Properties].

Select the [User Mapping] page.

Then place a check mark by any database that Bob should be able to access, and in the [Database Role Membership...] section, place a checkmark by db_datareader.

To absolutely make sure that Bob cannot change any data, place a checkmark by db_denydatawriter.

|||Thanks! That was just what I needed.

No comments:

Post a Comment