Recursos e tópicos adicionais do SQL Server não abordados em categorias específicas
The error you’re seeing (Msg 5149 / OS error 665) isn’t about free disk space — it’s a limitation of the NTFS file system. When SQL Server tries to grow a very large .mdf file in one step, NTFS can run out of metadata space due to fragmentation. That’s why you’re hitting the 665 error even though you still have 40 GB free.
A few practical options to resolve this:
- Grow in smaller increments: Instead of jumping straight to 235 GB, increase the file size in steps (e.g., 1–5 GB at a time). This reduces NTFS metadata pressure.
Add a secondary data file: Place an .ndf file in the same database, ideally on another disk. This avoids pushing the .mdf past NTFS limits.
Defragment the volume: Heavy fragmentation can trigger this error. Running a defrag may help temporarily.
Consider ReFS or larger allocation units: Long-term, moving the database to ReFS or reformatting NTFS with larger cluster size prevents this issue.
Thanks,
Lakshmi.