How to Prevent and Shrink Large SQL Transaction Logs in SOLIDWORKS PDM?

 Prevent and Shrink Large SQL Transaction Logs in SOLIDWORKS PDM


In Microsoft® SQL Server®, all newly created databases define the recovery model as Full. Perform regular backups of the transaction log to prevent it from growing too large for the database size. If the transaction log grows until you run out of disk space, SQL Server becomes unable to perform any data-modification operations to the vault database. 

The transaction-log file usually exists in a folder next to the masterdatabase file (MDF) and has the LDF file extension. For example, Engineering_log.LDF. 

To find the location of the MDF and LDF files for a database: 

Go to Start > All Programs > Microsoft SQL Server > SQL Server Management Studio. 

1. Log in to the SQL Server as a system administrator. 

2. Expand the Databases folder. 

3. Right-click the database and select Properties. 

4. Under Files, view the location of the database files.

SOLIDWORKS

If you rely on daily full-database backups, define the recovery model as Simple instead. The Simple recovery model limits the growth of the database-transaction log. 

To determine the recovery model of a database, follow these steps: 

5. In SQL Server Management Studio, expand the Databases folder. 

6. Right-click the database and select Properties. 

7. Under Options, view the Recovery Model setting.

SOLIDWORKS

After defining the recovery model as Simple for a database, you can shrink the current transaction log file to regain space:

1. In SQL Server Management Studio, expand the Databases folder. 

2. Right-click the database that has the transaction log you want to shrink and select Tasks > Shrink > Files. 

3. For the File Type, select Log. The dialog box displays the amount of free space available. Note: Do not shrink the actual database file. 

4. Click OK to shrink the log file.

SOLIDWORKS

If the recovery model is Simple, you now regain the free space. If the recovery model is Full, you must likely first back up the transaction log file before you can shrink the file.

Contact Us: Have questions or need assistance? Feel free to reach out!

Phone: +91 94454 24704
Email: mktg@egs.co.in


Comments

Popular posts from this blog

SOLIDWOKRS TECH TIP - SOLIDWORKS PROPERTY TAB BUILDER

Confused With Wire/Cable Harnessing? - Harnessing Technology By SolidWorks Electrical

SolidWorks Electrical Solutions for Control Panel Design