Short Version:
We need the ability to transfer a SQL MDF from one SQL Server to update a database on another regularly. Since only the MDF would be used to update an existing database;
- What steps are required on the "source" to ensure anything in cache/log is "commited" to the MDF before transfer from the source?
- Since this MDF would actually be updating an existing database on the "destination" server,what steps would be required on the destination to use this MDF file (e.g. Would the existing LDF file need to be "cleared out"? Would a new LDF need to be created? )
Long Version:
We have a virtualized software demonstration environment that runs SQL Server that we clone and provide to several members of our team to run locally. This process simply entails creating a clone of the entire server image and copying to a local workstation to run there.
To streamline this process and decrease the transfer time to copy the cloned image, we are planning to add a separate virtual disk (e.g. a "D:\ drive") that will include only the "dynamic files" that changed since the last update. This will allow us to only need to copy this second (much smaller) D:\ drive to our local machines, rather than the entire image.
Currently the SQL MDF and LDF files on the OSDisk of this image. What we would like to do is moveonly the MDF file to this D:\ drive, but leave the LDF file on the C:\ drive. This would mean each time a team member updated their D:\ drive, the existing LDF file on their image would be "out of sync".
This is where the above questions comes in:
Since only the MDF would be used to update an existing database;
- What steps are required on the "source" to ensure anything in cache/log is "commited" to the MDF before transfer from the source?
- Since this MDF would actually be updating an existing database on the "destination" server, what steps would be required on the destination to use this MDF file (e.g. Would the existing LDF file need to be "cleared out"? Would a new LDF need to be created? )
I hope this makes sense! Thanks in advance!!