Here is the situation:
We have multiple developers. We want to import/export(restore/backup)
.bakfiles 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 DATABASEand generate a
.bak. The other dev receives this
.bakand tries to
RESTORE DATABASEusing the
MOVEstatements to change to paths of the
.ldf‘s as they might be different. The problem is that it will complain about the
.ldf‘s being unoverwriteable, even though they are from the same database as the
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
.baknot replace the database but rather “merge” with it.
We are using MS SQL Express 2008 R2.
If any additional information is needed, just ask.
I logged off and back on and it seems to no longer throw the error.
Source : Link , Question Author : Moo , Answer Author : Moo