Database Reference
In-Depth Information
The Synchronize command generates an in-memory list of all database files on
both the source and target instances (presuming, of course, that the target instance
already has the database you're about to sync). Synchronization next compares the
metadata on two instances and comes up with the list of files that have a different
version number, name, or size on the two instances. The files that are different are
copied to a temporary folder on the target instance. The temporary folder uses a
GUID as the name. Once all new files are copied, the existing files (identical on the
source and target) are copied from the target instance's existing database folder to
the temporary data folder. Once the GUID folder has all the files, SSAS deletes the
existing database folder and renames the GUID folder to have the same name as
the database. Synchronization also increments the data folder version number.
Much like the restore function, synchronization keeps the existing database online
while new files are being copied. Therefore, if you're copying the large majority of
database files, you will need free space to support two copies of the same database
at the same time.
As you already learned, synchronization compares file version numbers, in addition
to file sizes and creation dates. If you want to avoid having to transfer all files, it is
best not to process any items on the target instance because doing so will change
the file version numbers even if the file contents do not change.
Due to its incremental design, synchronization can be considerably faster than
backup and restore . On the other hand, synchronization failure (perhaps due to a
network outage) can often lead to target database corruption. If the target database
is corrupted, we must either restore it from a backup or drop the corrupted version
and run a full synchronization from another instance. Yet another disadvantage of
synchronization is that it does not create a copy of the database as the backup com-
mand does. If the source database has incorrect data (or even a corruption issue),
synchronization quietly transfers the problem to the target instance.
Search WWH ::




Custom Search