MultiLogins to a User

  • 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.

  • 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.

  • 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

  • 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.

    ______________________________________________________________________________________________
    Forum posting etiquette.[/url] Get your answers faster.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply