Online Documentation for SQL Administrator for SQL Server

Shrink database


Use the Shrink Database Task dialog to create a task that attempts to reduce the size of the selected databases.

The General tab allows you to set common properties for this task. To set relationships between tasks use the Precedence constraints tab.

 

Maintenance plans - Maintenance Plan Editor - Managing tasks - Shrink database

 

 

Name

Enter the shrink database task name.

 

!CheckBox Enabled

Check this option to enable task execution.

 

Connection

Specify which server connection should be used for task execution. You can choose among existing connections or create a new one.

 

Database(s)

Use the drop-down list to specify which databases will be shrinked during the task execution.

  • All databases

Generate a maintenance plan that runs maintenance tasks against all Microsoft SQL Server databases except tempdb.

  • All system databases

Generate a maintenance plan that runs maintenance tasks against each of the SQL Server system databases except tempdb. No maintenance tasks are run against user-created databases.

  • All user databases

Generate a maintenance plan that runs maintenance tasks against all user-created databases. No maintenance tasks are run against the SQL Server system databases.

If you choose Select databases... item or click the ellipsis Ellipsisbtn button then define databases using the Select databases dialog.

 

Shrink database when its size becomes more than (MB)

Specify the size in megabytes that causes the task to execute.

 

Free space after shrink (%)

Stop shrinking when free space in database files reaches this size.

 

Specify whether to !RadioButton Return free space to the operating system or to !RadioButton Retain freed space in the database files after the execution of the task is completed.

 

 


See also:

Backup database

Check database

Rebuild indexes

Reorganize indexes

Update statistics

Execute job

Execute T-SQL statement

Notify operator

Clean up history

Clean up maintenance log

Precedence constraints