Executed the DBCC Shrinkfile('file1',emptyfile)DBCC Shrinkfile('file1',emptyfile)
successfully on first file in the filegroup and removed the file that I shrank.
Executed the DBCC ShrinkFile('file2',emptyfile)DBCC ShrinkFile('file2',emptyfile)
unsuccessfully on file 2. File 2 is in the same file group that file1 was in. Result 2555 error:
Cannot move all contents of file "%.*ls""file2" to other places to complete the emptyfile operation.
Restarted SQL, executed script from point 2, with same result.
I am ultimately trying to remove the file group that the file is a member of and the file group has only one remaining file in it. The file is has current allocated space of 1 MB and available free space of .81 MB
The files that I am trying to shrink and remove from the related file group have an .ndf file extension.
This is on a SQL 2016 Enterprise instance.