Can I do an NT defrag on a SQL Server .DAT device/file?

Neil Pike

March 4, 1999

1 Min Read
ITPro Today logo

A. Yes you can as long as you stop SQL first - NT needs exclusiveaccess to a file in order to defragment it. As long as there are no bugs in thedefrag program and the system doesn't crash in the middle of a defrag thenthere shouldn't be any problems.

Will it help? Usually not much as SQL devices don't tend to change in sizeonce they are created, so unless a disk was badly fragmented when the devicewas created so that NT could not allocate contiguous space for it all then itwon't be fragmented. It does nothing for SQL fragmentation of data/index pagesit only defragments the actual device.

If you create your SQL devices on a freshly formatted drive then you won'tget any fragmentation.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like