Shrink Database Task

The Shrink Database task reduces the size of SQL Server database data and log files. For more information, see Shrinking a Database.

By using the Shrink Database task, a package can shrink files for a single database or multiple databases.

The Shrink Database task encapsulates a DBCC SHRINKDATABASE command, including the following arguments and options:

  • database_name

  • target_percent

  • NOTRUNCATE or TRUNCATEONLY.

If the Shrink Database task shrinks multiple databases, the task runs multiple SHRINKDATABASE commands, one for each database. All instances of the SHRINKDATABASE command use the same argument values, except for the database_name argument. For more information, see DBCC SHRINKDATABASE (Transact-SQL).

Configuring the Shrink Database Task

You can set properties through the SSIS Designer. This task is in the Maintenance Plan Tasks section of the Toolbox in SSIS Designer.

For more information about the properties that you can set in the SSIS Designer, click the following topic:

For more information about setting these properties in the SSIS Designer, click the following topic:

Integration Services icon (small) Stay Up to Date with Integration Services

For the latest downloads, articles, samples, and videos from Microsoft, as well as selected solutions from the community, visit the Integration Services page on MSDN or TechNet:

For automatic notification of these updates, subscribe to the RSS feeds available on the page.