Error:
Msg 15410, Level 11, State 1, Server Server\INST2, Procedure
sp_addrolemember, Line 75
User or role 'mydomain\JShah' does not exist in this database.
Cause
Login already has an account under a different user name on particular database. For example mydomain\JShah user is mapped to database as user name jshah
Solution
ALTER USER [jshah] WITH NAME=[mydomain\jshah]
execute sp_AddRoleMember 'DBRole','mydomain\jshah'
OR
We can pass the actual user name
execute sp_AddRoleMember 'DBRole','jshah'
No comments:
Post a Comment