Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I restored a db on my SQL 2000 server called R1. I went to add R1 to the user mapping of a user called JUNO. I get an error:

User or role 'JUNO' already exists in the current database.

So I ran on R1 as SA I ran:


And got:

Incorrect syntax near the keyword 'USER'.

So I tried:

EXEC dbo.sp_revokedbaccess N'JUNO'

Another error:

Msg 15183, Level 16, State 1, Procedure sp_MScheck_uid_owns_anything, Line 17
The user owns objects in the database and cannot be dropped.
Msg 15284, Level 16, State 1, Procedure sp_MScheck_uid_owns_anything, Line 34
The user has granted or revoked privileges to the following in the database and cannot be dropped.

My goal is not to drop JUNO... but to allow JUNO to access the db. Using a different user name is not an option.

Any ideas?

share|improve this question
The title of this question could use some love so if you think of one let me know. – NitroxDM Sep 20 '10 at 20:31
up vote 1 down vote accepted

Looks like this did the trick:

sp_change_users_login 'Update_One', 'JUNO', 'JUNO'
share|improve this answer
What that stored procedure does is update the guid in the database for the user JUNO so that it matches the guid in the master database for the login JUNO. When these are matched up the user is able to log into the database. – mrdenny Sep 20 '10 at 22:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.