Solved

Copying underlying files for SqlServer results in login error.

Posted on 2014-07-24
2
147 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
[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 Comments
 
LVL 40

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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

696 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