Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

Error adding user mapping in sql server 2005

Posted on 2010-08-25
3
Medium Priority
?
439 Views
Last Modified: 2012-05-10
Hello,
  I just restore a database in SQLserevr 2005. Now I am trying to add the loging.

In SSMS 2005 I did teh following
Select security
Select the user
Select user mapping
click the checkboc netx the user name and enter the username and default schema
Select db owner and press ok


I get the error " user group or role  '<dbusername>' already exist in the current database

How do I fix this error.

Thanks





0
Comment
Question by:SiemensSEN
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
Rich Weissler earned 1000 total points
ID: 33526883
Try:
USE <DB>
GO
EXEC sp_change_users_login 'Auto_Fix', '<user>'
GO
0
 

Author Comment

by:SiemensSEN
ID: 33526940
Thanks ,
  That added the users . However, when I go to the database and select the security ->users and click the user 'user I don't see see any schemas under the 'Owned Schemas' section.
0
 
LVL 30

Assisted Solution

by:Rich Weissler
Rich Weissler earned 1000 total points
ID: 33527277
Actually, it didn't really add the schema -- the user already existed in the database, that just reconnected the two.  You should now be able to change the schema.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

647 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question