• SQLCrazyCertified (2/8/2013)


    Hi Perry,

    So, basically what it is doing is, it is creating the login using the SID of the user? and mapping it?..

    No, it's not!

    Its finding a database user and checking for a matching server login where the SIDs are different. It then uses the UPDATE_ONE parameter for sp_change_users_login which changes the user SID in the database to match the SID of the server login. If it did it the other way round it could break every other database that linked to the server login 😉

    SQLCrazyCertified (2/8/2013)


    I can understand if it's Windows authentication, but if it's SQL authentication, how does this work?....Please let me know if my understanding is correct?

    Thanks,

    SueTons.

    Windows authentication does not suffer from orphaned users.

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉