title: DBCC SHRINKFILE EMPTYFILE stucked because of sysfiles1 table
body: <p>I'm trying to migrate my pretty big db on SQLServer 2008 from one drive to another with minimum downtime and have some issues.</p>
  
  <p>So , basically, my plan is to use DBCC SHRINKFILE ('filename', EMPTYFILE) for extent movement.
  After some period of time, I shrink this file to avoid some space problems with log shipping db's in other server.
  Huge amount of extents were moved successfully, but then I've got this error</p>
  
  <p>DBCC SHRINKFILE: System table SYSFILES1 Page 1:21459450 could not be moved to other files because it only can reside in the primary file of the database.
  Msg 2555, Level 16, State 1, Line 3
  Cannot move all contents of file "filename" to other places to complete the emptyfile operation.
  DBCC execution completed. If DBCC printed error messages, contact your system administrator.</p>
  
  <p>So, what I've tried already:</p>
  
  <ul>
  <li>manually make my db bigger by adding empty space(just make file bigger by altering database)</li>
  <li>work a little bit with files in SECONDARY filegroup</li>
  <li>work with db after full\transactional backup</li>
  </ul>
  
  <p>And this didn't work.
  Can someone help me to fix this?</p>
  
  <p>Thanks a lot.</p>