I'm managing a 1.5Tb DB that is growing at a rate of ~37Gb/Week. I have been asked to split the DB into 500Gb files, but I cannot use Filegroups due to restrictions from the vendor.
My thinking was to create 3 devices and use the DBCC SHRINKFILE
command to equally spread the DB across the devices. Could anyone comment on best practices? Any pit falls to my process?
Best Answer
You really do not have much choice because how proportional fill works in SQL Server.
Proportional fill and how to check whether it works
I am assuming you currently have one file in primary filegroup.
DBCC SHRINKFILE
only way this can work is withEMPTYFILE
option because you cannot shrink smaller than your current used space. If you try to shrink with smaller size it will not work. Once you shrink withEMPTYFILE
option current file will only hold some system objects and rest will be split over to your 3 new files.Next problem will be subsequent data inserts will use the old file (currently emptied) because of proportional fill algorithm.
Here is an article by Paul Randal on the same topic.