February 4, 2011 at 4:02 am
Hello everybody. I am new to SQL Server 2008. I am using what ever help I am getting from the net. But I am stuck at one issue here. I will describe it below.
1. I have a database created (suppose TEST)
2. I have created two windows authentication login (suppose A & B)
3. I created a user (suppose Editors) and want to map it with logins A & B.
4. I have also created a schema TEST and is assigned as a owner to user Editors.
My roadblock is at point 3. I can map only one login at a time. I am not able to add logins A & B both to user Editors.
Please advise. Thanx in advance.
February 4, 2011 at 5:59 am
I think you need to create a Database Role of "Editors" and add the logins A and B to that role. You then assign permissions to the Database Role as needed, and you can add and delete users in the role as necessary. so you only need to define the permission set once, and not for each user.
Search msdn for "Database-Level Roles" Its probably worth looking at "Application Roles" too - though I haven't used them.
February 4, 2011 at 6:08 am
lganglani (2/4/2011)
My roadblock is at point 3. I can map only one login at a time. I am not able to add logins A & B both to user Editors.
With login you connect to instance. With User you connect to database.
As per my knowledge, there is a 1:1 relationship between login and user.
However, I am unable to support this with any Microsoft reference link.
M&M
February 4, 2011 at 6:28 am
You can do it one of two ways.
A:
Create a user for each login
Create a user defined database role
Add each user to that role
B:
Create a windows security group in your domain
Add each windows user to that windows group
Create a login for that windows group
Create a database user for that login
For B, you can still create a role and assign the windows group to that user defined database role if you want.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply