Solved

Move SQL Database to new server, user transfers but can't assign permissions

Posted on 2011-03-09
4
590 Views
Last Modified: 2012-05-11
I have a database I'm developing an ASP application on a staging server for that I now need to move to a production server.   I detached the database and copied over to the new server (SQL express 2008).  The database uses SQL Authentication to access via the ODBC connection and the original user transfers over from the old server when I look under the users of the database.  However it appears the password doesn't follow. Under the users of the database there isn't a way to change/modify the user and it doesn't show as a user under the SQL server.

If I try and add the user under the server it will not allow me to map the user to the database with an error that the user already exists.  What and how do I need to make this work?  Sorry I don't have that much experience with SQL server (obviously).
0
Comment
Question by:rjilek
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
xDJR1875 earned 500 total points
ID: 35089031
First, Delete the user from the database.
Second, Add the user under the server to the database.

0
 

Author Comment

by:rjilek
ID: 35089115
That kind of basically worked in a complicated way.  I could not just delete the user as it was an owner of some schema.  So I had to create a temp user to assign the schema to and then allow me to delete the user under the database.  Then I could create the user again under the server and reassign the schema to it under the database.  Anyway it worked and thanks the the hints and the quick reply!
0
 

Author Closing Comment

by:rjilek
ID: 35089125
The solution was critical in getting me to think in the right direction.
0
 
LVL 17

Expert Comment

by:xDJR1875
ID: 35089243
There are other ways of doing this, a system stored procedure(can't remember the name) can map a migrated user to a current user, but not sure if that is available for sql express.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

932 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now