SQL Server Performance

Shrinkfile Error

Discussion in 'SQL Server 2005 General DBA Questions' started by pdregan, May 12, 2007.

  1. pdregan New Member

    Any body got any ideas how we might get around the following error.

    command used:

    dbcc shrinkfile('DB_Data',EMPTYFILE)


    DBCC SHRINKFILE: Page 3:9224674 could not be moved because the partition to which it belonged was dropped.

    Msg 2555, Level 16, State 2, Line 1

    Cannot move all contents of file "DB_Data" to other places to complete the emptyfile operation.

    DBCC execution completed. If DBCC printed error messages, contact your system administrator.

    The file needs to be split from 1 x 200G file into multiple data files. Works for a couple of hours the gives this error, file is still 100G, but has 99% empty space.


    There are 10 types of people, those who understand binary jokes and those who dont
  2. MohammedU New Member

    Is there any partitioned object exists in on this file which spans to different file group?

    EMPTYFILE option migrates all data from the specified file to other files in the same filegroup.

    If you have partitioned object then move that object to diffent file group and then try again...


    All postings are provided “AS IS” with no warranties for accuracy.
  3. satya Moderator

    Also confirm the output of
    select * from sysfiles
    in addition to SP_SPACUSED on this particular table or database.
    By chance doyou have any IMAGE or TEXT type data type on this database?

    Satya SKJ
    Microsoft SQL Server MVP
    Writer, Contributing Editor & Moderator
    This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.

Share This Page