Skip to main content
File extension and edition are not relevant to the problem. Version is already covered in the tag.
Source Link
Aaron Bertrand
  • 181.5k
  • 28
  • 402
  • 619

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.

Executed the DBCC Shrinkfile('file1',emptyfile) successfully on first file in the filegroup and removed the file that I shrank

Executed the 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" 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.

Executed the DBCC Shrinkfile('file1',emptyfile) successfully on first file in the filegroup and removed the file that I shrank.

Executed the 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 "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

added 3 characters in body
Source Link
Aaron Bertrand
  • 181.5k
  • 28
  • 402
  • 619

When I try the second dbcc shrinkfile ('filename',emptyfile), the response is a 2555 error

Executed the DBCC Shrinkfile('file1',emptyfile) successfully on first file in the filegroup and removed the file that I shrank

Executed the 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" to other places to complete the emptyfile operation.

Restarted SQL, executed script from point 2, with same result. I

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.

When I try the second dbcc shrinkfile ('filename',emptyfile), the response is a 2555 error

Executed the DBCC Shrinkfile('file1',emptyfile) successfully on first file in the filegroup and removed the file that I shrank

Executed the DBCC ShrinkFile('file2',emptyfile) unsuccessfully on file 2. File 2 is in the same file group that file1 was in. Result 2555 error.

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.

Executed the DBCC Shrinkfile('file1',emptyfile) successfully on first file in the filegroup and removed the file that I shrank

Executed the 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" 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.

Source Link
Loading