Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 User or Role already exists in current DB

Author  Topic 

azmi
Starting Member

37 Posts

Posted - 2005-11-16 : 21:24:00
the problem is like this;
I had one database called common database in sql server, when i want to add my user name for that database in SQL Enterprise Manager,system show error messsage;

Error 15023:User or role 'amusa' already exists in current database,

where 'amusa' is my user name. Database role membership that i put is public and db_owner.

I need advice how to solved this error message.Any ideas. Thanks





Fatalsniper
Starting Member

45 Posts

Posted - 2005-11-16 : 21:30:36
I've got the same thing going on in my SQL Server, I recoverd a Backup I made on another System. and I already had different users in both computers, now I have some that when I try to add them to the DB recovered from the backup, says already exists but I can't add 'em 'cause they already exist.
There's no way I can find 'em as actual users, but supposedly they exist.
Don't know what to do!...
I want to erase them an create them back, but I couldn't delete them.

I get the very same error message as the topic!

Any suggestions?
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-11-16 : 21:36:02
Lookup "sp_change_users_login" in Books Online. That should let you fix the issue. I'm guessing you have SIDs out of synch somehow.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

azmi
Starting Member

37 Posts

Posted - 2005-11-16 : 23:58:58
I use EXEC sp_change_Users_login 'Update_One', 'your_user_name', 'your_user_name' and and it's solved the problem. Thanks for your information..
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-11-17 : 00:07:01
Glad it helped you.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

Fatalsniper
Starting Member

45 Posts

Posted - 2005-11-17 : 23:48:43
Thanks a bunch Derrick, you´re always there!...with the answers!!!
Go to Top of Page
   

- Advertisement -