Solved

How to reduce the size of SQL Server log files

Posted on 2014-07-30
2
168 Views
Last Modified: 2014-08-03
How to reduce the size of MS SQL Server log files. I have an example where the .mdf file is 168Mb, but the .ldf file is 3Gb. I also have another where the .ldf is 189Gb.
0
Comment
Question by:BishopsWaltham
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 40228530
please read up this article first for a full understanding of why the log files are getting large, followed by how to keep them "small" in normal time and how to perform a one-shot shrinking:
http://www.experts-exchange.com/Database/MS-SQL-Server/A_11077-How-to-shrink-a-bloated-log-file.html

NOTE: do not perform regular (like daily) shrinks of the database or log files, this would just be waste of IO and slow down your db operations during the day
0
 
LVL 25

Expert Comment

by:Mohammed Khawaja
ID: 40228690
Best practice is to backup your DB and then the TLOGs and ensure to select the option "truncate at checkpoint" in your backup software.  This way logs will be flushed after successful backup.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction People like FTP.  It's a solid, stable, robust protocol for quickly transferring files between two hosts using TCP/IP.  In most cases it's much faster than SMB or CIFS, and certainly much easier to set up between organizations.  This…
Have you ever stumbled upon a software that is so great that you just love? It happened to me. Love at first sight. Filezilla Server.   Ok its not the most advanced ftp server I've came across. But its a fairly simple piece of software to get the …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question