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
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
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.
The post SOLIDWORKS EPDM SQL Maintenance Task Shrink Database appeared first on SOLIDWORKS Tech Tips, Videos & Tutorials from Javelin.