Why can't I defragment my SQL 2008 .mdf file?

Posted by LesterDove on Server Fault See other posts from Server Fault or by LesterDove
Published on 2012-05-25T03:21:34Z Indexed on 2012/06/04 16:45 UTC
Read the original article Hit count: 206

Filed under:
|

I am defragmenting a badly (95%) fragmented drive upon which large (35 gig) SQL Server 2008 .mdf files live. After defragmenting and viewing the exception report, I see that the production .mdf file that I'm most interested in could not be defragmented. I initially figured it was because MSSQL had an exclusive lock on the file, so I detached it and tried again. No luck - this particular .mdf file could not be defragmented. What am I missing? Most online references suggest that I should be able to file defrag an .mdf

A note: yes, I'm talking about file defragmentation, not index defrag, which is already being done routinely, and which I'll re-run after this.

Thanks! What am I missing?

© Server Fault or respective owner

Related posts about sql-server

Related posts about defrag