SOLIDWORKS EPDM SQL Maintenance Task Shrink Database

Article by Joe Medeiros, CSWE updated July 3, 2015


The Shrink Database task reduces the size of SQL Server database data and log files. This task can cause index fragmentation and is not recommended by SOLIDWORKS. SOLIDWORKS does note that “on large databases or environments with hundreds of users, shrinking the SOLIDWORKS® Enterprise PDM database once per year may improve overall performance.” Please refer to the Solidworks Knowledge base article S-067843 for more information. An active subscription is required in order to access the knowledgebase.

Before running this task:

  • you should have good understanding of working with SQL databases
  • a recent back-up of the database and the archive
  • if possible, a test run on a non-production test vault that is mirror of your production vault
  • ensure that no is accessing the database during this operation

The steps to run the Shrink task may vary between versions of SQL. These instructions are based on Microsoft SQL 2014. If you are using a different version of SQL, please refer to the SQL Help for instructions. In fact, even if you are using  Microsoft SQL 2014, I would still recommend reviewing SQL Help for recommendations and additional information, beyond what is covered in this article.

This task is launched by right clicking on the database you wish to shrink and selecting the task Shrink Database.

Shrink Database

Shrink Database

Ensure that the correct database is selected and click on OK to shrink the database. Depending on the size of the database, this may take a while. Running this task after hours is recommended.

ShrinkDB Window

ShrinkDB Window

Selecting the ‘Reorganize files before releasing unused space…’  option, will allow you to specify a target percentage.

As noted earlier, Shrink Database can cause fragmentation of the tables and may require rebuilding of  indexes. This option should be fully evaluated before its use.

Related Links

Want to do more with SOLIDWORKS PDM?

Our Certified SOLIDWORKS PDM Experts can help you to:

Find Related Content by TAG:

Joe Medeiros, CSWE

Joe Medeiros is a SOLIDWORKS and PDM Certified Expert. He has been helping SOLIDWORKS users with training, mentoring and implementations since 1998. He combines industry experience with a thorough understanding of SOLIDWORKS products to assist customers in being successful. He shares his experience and expertise through blogs; one of which has been incorporated into the SOLIDWORKS Essentials training manual.