Truncating Database Transaction Log

Posted under tips on November 02 , 2019 by Nidhisha Shetty

Databases are usually in Full Recovery mode. This means that every transaction is retained in the transaction logs allowing a point in time recovery.
The implication of this is that unless the transaction log is truncated, no space gets freed up on deleting rows from any tables. Delete operations only shift data from the table to the logs.

Following are the steps to reduce the size of transaction log in SQL Server Management Studio:

  1. Right click the database, select Tasks → Shrink → Files as shown in the following figure:

    Fig 1

    Fig 1: Options to reduce transaction log file size

  2. On the Shrink File window, change the File type field option to Log. You can also choose either Release unused space, Reorganize pages before releasing unused space, or Empty file by migrating the data to other files in the same filegroup options:

    Fig 2
  3. Click OK, this will reduce the file size of the transaction log.


TAGGED:DatabaseTruncateSSMSTransaction Logs


Recent Posts


Database Table Indexing

January 03, 2020 bySwanand Nirgudkar

For an automated process any operation involving database is relatively expensive since it involves…

Continue Reading

ActivityRunner Not Starting

October 11, 2019 bySwanand Nirgudkar

One may face issue while applying SheetKraft patch wherein ActivityRunner service refuses to start…

Continue Reading

Reshape instead of Fill-Down condition

May 02, 2019 bySaloni Gude

Originally published on Thu, 2 Mar, 2017 at 6:59 AM Fill is used to generate multiple values from an…

Continue Reading

DataFromExcel Fails in Excel 2010

May 02, 2019 byUpasana

Originally published on Wed, 1 Mar, 2017 at 6:13 AM This problem occurs when you try to Import data…

Continue Reading

Let's talk

Address

7th floor, Unit No. 701, C Wing,
Kailas Business Park, S. Veer Savarkar Marg,
Park Site, Vikhroli (W), Mumbai-400079.

 

Phone

+91 22 62362043

 

For General Queries & Technical Support

contact@quantumphinance.com

 

For Sale and Demos

sales@quantumphinance.com