Solved

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

Posted on 2011-03-09
4
591 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:
Daniel Reynolds 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:Daniel Reynolds
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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