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) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".