Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 database access

Author  Topic 

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2010-10-06 : 10:13:49
Hi,

In our development server, I want to give only read and execute permissions to developers. I was checking below two database roles. But I don't want my developers to change the data in tables. Please advice on giving access(read and execute)

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

db_datareader
Members of the db_datareader fixed database role can read all data from all user tables.

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2010-10-06 : 11:41:01
urm -- you want to give your developers only read and execute permission on the *development* server.

What if they have to design an UPDATE or INSERT?


Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-06 : 13:16:26
We give db_owner to our developers in the development environment. Db_owner is the correct role.

Not allowing them to change data is silly in a dev environment. How are they supposed to actually develop then?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2010-10-06 : 16:17:49
To answer your question without regard to the environment you are doing this in (I agree with the others, developers should have full access in a development environment), you can do the following on SQL Server 2005 and greater:

Add the users to the db_datareader role (read permissions)

Then, grant execute access to the user:

GRANT EXECUTE ON SCHEMA::dbo TO {user/role};

If they need to be able to execute procedures in other schemas, grant those also. If there are a lot of developers, I would probably create a role and add the users to the role instead of granting to each individual.

Jeff
Go to Top of Page
   

- Advertisement -