Skip navigation

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

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

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

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

TAGS: SQL Server
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.