Skip to main content
You are here:

How to Shrink the SOLIDWORKS PDM SQL Transaction Log

Every SOLIDWORKS PDM vault database in Microsoft SQL Server has an associated transaction log that tracks all changes made to the database. In some cases, this log file can grow quite large, leading to performance issues in both SQL Server and the PDM environment. If you’ve recently switched the Database Recovery Model from Full to Simple, you can safely reduce the size of the transaction log by performing a shrink operation.

 

Note: For transaction log files, shrinking is usually temporary unless the underlying issue (such as using an incorrect recovery model) is addressed. Avoid frequent shrinking as it can lead to fragmentation and performance issues.

How to check the size of the Database Transaction Log File

  1. Launch Microsoft SQL Management Studio and log in using the sa (system administrator) account.
Viewing Microsoft SQL Management Studio login window
  1. In Microsoft SQL Management Studio, expand Databases and then right-click your vault’s name followed by Reports > Disk Usage.
Viewing report disk usage selection
  1. Review the Transaction Log Space Usage The PDM vault used in this example is very small with minimal transactions. A vault used more frequently may show more disk usage, even up to 90+%.
Viewing transaction log space usage percentage

The log file’s size can also be viewed on the server in File Explorer. The default log locations is C:\Program Files\Microsoft SQL Server\MSSQL.MSSQLSERVER\MSSQL\DATA with an .LDF file extension. For example, ACME.LDF. DO NOT delete the log file.

 

If your log uses a non-default location, you can find it in MS SQL Management Studio by right-clicking the vault and then selecting Properties. The log file location is listed in Files as shown below.

Viewing file location navigation

How to Shrink the Transaction Log File

  1. Launch Microsoft SQL Management Studio and log in using the sa (system administrator) account.
Viewing Microsoft SQL Management Studio login window
  1. Expand the Databases folder and right-click your vault’s name. From the menu, select Tasks > Shrink > Files.
Viewing shrink tasks and files selection
  1. For File Type, select Log from the dropdown list. It is NOT recommended to shrink the actual database file. Click OK to shrink. Note, there is not a confirmation screen. Once the window closes, review the Disk Usage again to see the space changes.
Viewing file type log selection window
  1. If the Recovery Model is set to Simple, then free space should now be regained.

    NOTE: The PDM vault used in this example is very small with minimal transactions. A vault used more frequently may show more disk usage, even up to 90+%.
Viewing transaction log space usage percentage

Technical Support

Get help from our team by Calling us at 800-364-1652 x 2. You can also get assistance by clicking the Technical Support button or the Email Our Experts button below. 

Scroll to Top