-1

Here is the situation:

We have multiple developers. We want to import/export(restore/backup) .bak files whilst working on the same, but local, databases(Each dev has a local instance of DB: A).

The problem is as follows:

I try to do a BACKUP DATABASE and generate a .bak. The other dev receives this .bak and tries to RESTORE DATABASE using the MOVE statements to change to paths of the .mdf/.ldf's as they might be different. The problem is that it will complain about the .mdf/.ldf's being unoverwriteable, even though they are from the same database as the .bak.

Is there a way to do what we want? It has to be done through sqlcmd. It would also be a plus if we can have the .bak not replace the database but rather "merge" with it.

We are using MS SQL Express 2008 R2.

If any additional information is needed, just ask.

Thanks!

Moo
  • 97
  • 1
  • Posting the exact statement and error message that your attempted restore generated would be helpful. My guess is that adding `with replace` will fix it. – Ben Thul Jun 17 '15 at 10:31
  • 3
    I'm voting to close this question as off-topic because it was a temporary permissions issue and logging out and back in "fixed" it. – Katherine Villyard Jun 18 '15 at 02:11

1 Answers1

-1

I logged off and back on and it seems to no longer throw the error.

Moo
  • 97
  • 1
  • 1
    It is okay. If you would explain the reasons for the googlers of the future, you would probably get some upvotes, too. – peterh Jun 18 '15 at 04:13