Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server users and groups 1

Status
Not open for further replies.

wbodger

Programmer
Apr 23, 2007
769
US
I am wondering how I would go about creating a group to which I could add 3 or 4 user accounts and give that group the db_datareader role in specific databases on my server.
 
Create a Windows active directory group. Add the users to that group and then add the group to SQL Server.

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
Also, roles can be nested in roles in a database, so you could create a role in the database, add all four users to it, and add the role to the db_datareader role. It is just a matter of at what level you want to administer the membership of that role.
 
So, I could create a custom role, then add the windows users to that role and then add db_datareader to the created role?
 
You would add the newly created role to db_datareader
Code:
create role newreaders

exec sp_addrolemember db_datareader, newreaders
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top