February 8, 2011 at 10:29 am
I'm trying to add a user mapping to an already existing login. In the Login Properties for the login, I need to add another database, so I check it and enter the User and Default Schema. When I click OK, it gives me an error 15023 saying that the user already exists. It's supposed to already exist, I'm just adding a User Mapping to this login. Help?
February 8, 2011 at 10:35 am
does the user is already added in the particular db??
Regards
Sushant Kumar
MCTS,MCP
February 8, 2011 at 2:45 pm
User mapping in the GUI attempts to create the user in the database you're trying to map to, thus the error you got.
Use sp_change_users_login to remap the existing database user to the existing login.
example: sp_change_users_login 'update_one', 'username', 'loginname'
Greg
February 9, 2011 at 6:00 am
I think some users got orphan.
exec sp_change_users_login 'REPORT'
--( run in every database to see which all logins got orphan)
Regards,
Sushant
Regards
Sushant Kumar
MCTS,MCP
February 9, 2011 at 7:53 pm
Thanks guys, that did the trick...
May 19, 2013 at 11:02 am
if there is login exist then delete and add login to corresponding user.
May 19, 2013 at 11:59 pm
Hello,
sp_change_users_login will update the users, why do have to delete and update for each DB.
Note this is a old thread.
Regards
Durai Nagarajan
May 20, 2013 at 1:53 am
go Database name => security =>users then delete the user.
Add new user..
Any Problem .Let me know.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply