Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Restore to my development box does not work

$
0
0

I asked my client to send me the *.bak files, so that I could look at his data on my machine, to test out with my code, in VisualStudio, in Debug mode. Initially, when I tried to restore, I ran into "Files could not be found" message? I could see, in the error message, that the *.bak files referred to the original "production machine" location, on my client's machine? Something I was not expecting. A quick search online revealed a fix, use the OVERWRITE EXISTING DATA (WITH REPLACE) option. I also checked the 'Close existing connections to destination database' option. And that worked. BUT! My login became 'messed up', permissions were gone? So I tried to delete the user but SSMS refused to obey. I had to 'transfer ownership' of the table to 'sa' and only then, SSMS allowed to drop the user. But as I tried to recreate the user, SSMS kept telling me it already existed?

I confess I don't understand all the ramifications that comes with granting users 'ownership' access, I'm discovering it the painful way, but, at the time, when I created the user, it was the only way my VisualBasic code was able to log in the database and have access to the tables. 

Any suggestion on how I could restore the data from my client without touching the user?


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>