DBCC SHRINKFILE with emptyfile generating filegroup is full errors

1k Views Asked by At

I have been using DBCC SHRINKFILE with EMPTYFILE to move data from one secondary data files data to another. There is currently four files in the filegroup and there is over 1TB free of space between those files.

Oddly, I've had the system alert me that the filegroup that these files belongs to is full and that no space could be allocated for a table (user) table.

I've used this numerous times before and never had this happen and some googling couldn't seem to find any other incidents that people had reported. Anybody have any ideas?

Version of SQL Server is 2008R2

1

There are 1 best solutions below

0
On

I had this exact problem. It turned out that a nightly maintenance process was issuing an ALTER INDEX command on an index in the same file while the DBCC SHRINKFILE WITH EMPTYFILE was running. Makes sense that ALTER INDEX wouldn't work while the file is marked to not accept new data.

In our environment, we resolved this by preventing the nightly maintenance process from issuing this command and issuing it manually outside of the time that we allow the SHRINKFILE to run.