• FreeHansje (9/10/2012)


    So I have restored a database to a new server and a check reveals a DB-user being orphaned. However, this user must have been created as CREATE USER WITHOUT LOGIN, for on the original server this user is not connected with a login.

    Now, how do I solve the orphaned user? Is there a problem, I wonder, since there was no login in the first place? sp_change_users_login does not work here, for it needs a login to connect the db-user with.

    Any help?

    there's nothing to fix;

    if you create a user without login, it literally never logs in...so there is nothing to change.

    you might create a user like that so that you can run EXECUTE AS under higher permissions in a procedure or trigger, but noone will ever use that USER to actually connect.

    If you need an example, let me know, but you should be good to go if you fixed the other users that do have logins.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!