Removing DB file

  • Hi Experts,

    Getting below error while ran EMPTYFILE please help.

    DBCC SHRINKFILE: Page 10:6521 could not be moved because it is a work table page.

    Msg 2555, Level 16, State 1, Line 1

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

    TIA

  • Aren't you shrinking tempdb by any chance?

  • I am trying to run the below script

    dbcc shrinkfile ('tempdata',emptyfile)

    go

    ALTER DATABASE [tempdb] REMOVE FILE [tempdata]

    GO

  • this is something you would have to do when the server was quite. Ideally just after a restart and before any one logged on.

    ---------------------------------------------------------------------

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply