Wednesday, March 7, 2012

problem with re adding a login

I dropped a login from securities list. and when i try to re add that
login and give the user access to a particular database the error
message
"Error 15023: User or role "user" already exists in the current
database" .
upon enquiry i found out that the PUBLIC role in the databse still
contains that user in its list. I cant seem to remove this user from
the PUBLIC role. and so im not able to readd this user and give him
access to a particular databse... PLease help

Thank You in advancesailesh (sail_96@.yahoo.com) writes:
> I dropped a login from securities list. and when i try to re add that
> login and give the user access to a particular database the error
> message
> "Error 15023: User or role "user" already exists in the current
> database" .
> upon enquiry i found out that the PUBLIC role in the databse still
> contains that user in its list. I cant seem to remove this user from
> the PUBLIC role. and so im not able to readd this user and give him
> access to a particular databse... PLease help

Did you try sp_dropuser to get rid of him? sp_change_users_login is another
alternative, which permits you to do it without dropping the user.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

No comments:

Post a Comment