Monday, March 26, 2012

external file fragmentation

I know that as the data file autogrows, we are subject to fragmentation
externally.
As an example, I created a data file starting at 1 GB and then have autogrow
set at 250 MB. . Say now its around 2 GB which means we may have 5 different
sets of contiguous allocations for this file. i.e one contiguous allocation
for the first time creation of 1 GB and then 4 250 MB allocations
Now say I detach this db and move the 2 GB file to another server.. Will it
copy this 2 GB file as one contiguous file or still have it broken down into
5 ? Trying to understand file level fragmentation.> Now say I detach this db and move the 2 GB file to another server.. Will
it
> copy this 2 GB file as one contiguous file or still have it broken down
into
> 5 ? Trying to understand file level fragmentation.
This depends. If you have on the target server enough contiguous space, the
new file should not be fragmented. Anyway, you can always check the
fragmentation and defragment files on disk with Disk Defragmenter.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com

No comments:

Post a Comment