Shrink Database (General Page)

Use this dialog box to shrink the size of a database.

Shrinking data files recovers space by moving pages of data from the end of the file to unoccupied space closer to the front of the file. When enough free space is created at the end of the file, data pages at end of the file can deallocated and returned to the file system.

Warning

Data that is moved to shrink a file can be scattered to any available location in the file. This causes index fragmentation and can slow the performance of queries that search a range of the index. To eliminate the fragmentation, consider rebuilding the indexes on the file after shrinking.

Options

  • Database
    Displays the name of the selected database.

  • Current allocated space
    Displays the total used and unused space for the selected database.

  • Available free space
    Displays the sum of free space in the log and data files of the selected database.

  • Reorganize files before releasing unused space
    Selecting this option is equivalent to executing DBCC SHRINKDATABASE specifying a target percent option. Clearing this option is equivalent to executing DBCC SHRINKDATABASE with TRUNCATEONLY option. By default, this option is not selected when the dialog is opened. If this option is selected, the user must specify a target percent option.

  • Maximum free space in files after shrinking
    Enter the maximum percentage of free space to be left in the database files after the database has been shrunk. Permissible values are between 0 and 99.