However, the snapshot file uses no preallocated
space in the way a normal database file would. It??™s a sparse file, a feature of NTFS where
only nonzero information is stored on disk. Normally, when a file is written to disk and
it contains ???blank??? information, that empty space is ???zeroed out,??? meaning it is filled by
setting all of the bits to 0. Sparse files do not do that. So if data pages written to the
snapshot file contain empty initialized space, that empty space will not be stored
within the snapshot file.
Keep in mind that any change to a data page results in the entire page being written
to the sparse file. If the page is fairly full, the size advantage of using sparse files will be
for naught. For an OLTP database, the chance of the snapshot growing to a significant
size is high.
It??™s also possible to have multiple snapshots of the same database. You might want to
do this for a number of reasons (which I??™ll discuss later), but the net effect is that changed
data pages need to be written to multiple locations simultaneously. Of course, this
increases disk usage and I/O, particularly with an active OLTP database.
Pages:
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426