Database will not shrink

  • I have backed up the Db and tried to shrink it using the Dbcc shrinkdatabase truncateonly...but the database will not shrink. One of the Dbs is 193 Gb with 60% free space. Any idea what could be stopping this form working.

    Thanks

    rw

  • Try shrinking the files instead of the database that usually does the trick

     

    hth

     

    David

  • Did you check the recovery model? If set to simple your shrink will give a much better result.

    Bart

  • Set the recovery model to simple

    Run a full backukp.

    run the DBCC command shrink file

    DBCC SHRINKFILE (FileName, TargetSize)

    FileName is the logical name of the file, TargetSize is the size in MB that you want the file to shrink down to.

    Set the recovery model back to it's previous mode.

    Here's a pretty decent article: http://support.microsoft.com/?kbid=907511

    Good luck.

  • truncate_only does not consolidate the data, so only space at the end of the file is released.

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

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