Home Forums SQL Server 2008 SQL Server 2008 - General Error 21335: [SQL-DMO] The new DB File size must be larger than the current size. RE: Error 21335: [SQL-DMO] The new DB File size must be larger than the current size.

  • You have to use DBCC SHRINKFILE to reduce a file below its initial allocation.

    USE <your_db_name>

    -- get the file#s / names of all the db's files

    EXEC sp_helpfile

    Then choose the file# or filename you want to shrink. For example, to shrink the primary file to 2GB:

    DBCC SHRINKFILE ( 1, 2000 )

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.