How do I shrink a SQL Database Transaction Log? Follow

Overview

On some systems, the SQL Transaction Log can grow very large.  This can cause slowness in SQL as well as fill up the driver where the file is located.  These directions will walk you through using the built in features of SQL to shrink the .LDF file that the Transaction Log uses.

Instal SQL Management Studio Express

Complete this step only if the computer you are using does not already have the application installed.

Download SQL Management Studio Express 2008 from this location:

SQL Management Studio Express

Click the Download button.

Scroll to the bottom of the list and select the correct version for your Operating System (eg. x64 or x86).

Download and install the application on your computer.

Log on to SQL

Log on to SQL Management Studio or SQL Management Studio Express with the GlasPac LX sa database password.

Set the Database Recovery Model to Simple

Open the list of Databases

Right-click on the database in which the transaction log file needs to be shrunk/truncated, then choose Properties.

Under "Options", change the Recovery model from "Full" to "Simple" and click OK.

Shrink the Database Transaction Log File(s)

Once the database Recovery model has been set to Simple, right-click the target database and click on: Tasks > Shrink > Files.

Change the File type to "Log", and click OK. If the database has more than one transaction log file, repeat for each one if required.

Set the Database Recovery Model to Full

Use the instructions to set the database Recovery model back from "Simple" back to "Full".

 

Have more questions? Submit a request

Comments

Powered by Zendesk