I have been running into a duplicate user/login problem after restoring
multiple databases that have the same user.
Say I restore two databases:
database1
database2
And user developer is in both.
After restoring both databases, the developer login exists. If I try to
modify the login so that it has access to both databases, then I get
problems. I basically get a Error 21002(SQL DMO) User developer already
exists. When I try to give access to database2.
Looking at the users under database1, I see that there is a developer login.
There is also one under database2. However, I can delete the user under
database1, but not the one under database2. When I try to delete the
developer user from database2, I get Error 15008: User developer does not
exist in the current database.
This really doesn't make sense since, in one case I am being told it already
exists, and in the other, I can see the user, but not delete it.
I tried playing around with the sp's that allow for user/login manipulation,
but I haven't had any luck.
Does anyone have any ideas on how to resolve this. I'm assuming that there
is a glitch in EM that is causing the problem. If I can figure out the
brute force SQL to correct the problem, that would be great.
Regards,
Scott