?
Solved

Error adding user mapping in sql server 2005

Posted on 2010-08-25
3
Medium Priority
?
435 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

770 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