Wednesday, February 15, 2012

Error 21002 : User already exists

Running SQL Server 2000 Enterprise SP3a ( Windows Server 2003 )
I restored several databases from one instance ( on another box ) to another
. Now I am trying to add the users
to the second box ( to duplicate those on the first ) where I restored the d
ata and I am getting this error when
trying to add the database permissions for the user.
I tried working with sp_change_users, but the report shows nothing ( no rows
returned ) .
I tried deleting user using sp_droplogin, it dropped the user, but same thin
g happened again
once I readded him. I also tried the sp_change_users_login ( autofix) to no
avail ( nothing happened )
Any help would be appreciated.
ThanksRun select * from sysusers in the database that you are trying to add the
user. If the user does exist then run the sp_granddbaccess procedure to
grant access to the user. You may then need to run sp_change_users_login
again after verifying that the login exists for this user.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||That response should hav been sp_grantdbaccess.
Rand
This posting is provided "as is" with no warranties and confers no rights.

No comments:

Post a Comment