Solved

Copying underlying files for SqlServer results in login error.

Posted on 2014-07-24
2
144 Views
Last Modified: 2014-07-24
As I have documented this problem for myself I am attaching the description as a word document which has screenshots.

I am copying underlying data files for sqlserver from development to production and I am getting the security errors in the document.

There is a fix for the problem as noted in the Word doc but as I have to refresh the data often I really do not want to have to run the fix every time I copy underlying files (from DATA directory) over.
Note.  I always copy the .mdf as well as the .ldf.
forExperts.docx
0
Comment
Question by:supportoranges
2 Comments
 
LVL 39

Accepted Solution

by:
lcohan earned 500 total points
ID: 40216930
"In the future refreshing underlying table and log file shouldn’t create such hassle!"

you need to understand and remember that a SQL login is tied to the SQL Server Instance AND saved inside your database as well but as you copy the DB from one server to another obviously the login from server A is not identical with the login from server B even if they have the same name so that's why you need to rebind the login from copied database to the login from the DEV server.

You should be able to workaround this by using sp_dropuser/sp_adduser in the database you moved to bind it to the SQL server login
0
 
LVL 1

Author Closing Comment

by:supportoranges
ID: 40216944
Thank you so much I appreciate it.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to shrink a transaction log file down to a reasonable size.

896 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

11 Experts available now in Live!

Get 1:1 Help Now