Perform a database shrink

A database shrink recovers unused storage space of your database. You can manually run a database shrink or automatically run it with a schedule after log or archive cleanup tasks. Shrinking the database may be followed by an automatic index rebuild. Both operations could take a long time, affect database performance, and cannot be stopped once initiated.
Prerequisites
  • Make sure that you have the
    Configure Database Maintenance
    permission.
  • Make sure that you have a membership in the Microsoft SQL Server db_owner database role or sysadmin server role.
To manually run a database shrink
  1. On
    Tools
    , select
    Database Management
    .
  2. On
    Database Management
    , select
    Database Maintenance
    .
  3. In the
    Manual database index maintenance
    section, select
    Start Shrink
    .
To automatically run a database shrink with a schedule
  1. On
    Tools
    , select
    Database Management
    .
  2. On
    Database Management
    , select
    Database Maintenance
    .
  3. In the
    Schedule Archive/Log Cleanup
    section, create or edit log or archive cleanup tasks, and then select the
    Shrink the database
    checkbox. In the percentage list, enter any integer from 30 to 70. A database shrink will be initiated after the log or archive cleanup task if the available free space exceeds the configured threshold.
  4. Select
    OK
    .
    IMPORTANT:
    When a log or archive cleanup task is running, some user or system requests may be paused because Microsoft SQL Server may lock tables to delete data. If a database shrinking task follows, it may take even longer. While the requested operations will resume once the tables are unlocked, the waiting time depends on the amount of data being processed, and unexpected issues may occur. We recommend not using the FactoryTalk AssetCentre system during log or archive cleanup tasks.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal