• Bhuvnesh (1/17/2013)


    broonie27 (1/16/2013)


    Why would the DB still be showing 10GB free space after a shrink?

    From BOL If target_size is specified, DBCC SHRINKFILE tries to shrink the file to the specified size. Used pages in the part of the file to be freed are relocated to available free space in the part of the file retained. For example, if there is a 10-MB data file, a DBCC SHRINKFILE operations with a target_size of 8 causes all used pages in the last 2 MB of the file to be reallocated into any unallocated pages in the first 8 MB of the file. DBCC SHRINKFILE does not shrink a file past the size needed to store the data in the file. For example, if 7 MB of a 10-MB data file is used, a DBCC SHRINKFILE statement with a target_size of 6 shrinks the file to only 7 MB, not 6 MB.

    See http://technet.microsoft.com/en-us/library/ms189493.aspx

    No, I'm not running the task with target_size I don't think but it does run with the default of 10% of free space to remain after shrink. Maybe that is my problem?