Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Very Large LDF File

Posted on 2013-02-07
5
Medium Priority
?
411 Views
Last Modified: 2013-02-07
I have a database that has a 10gb LDF file.  I have tried shrinking it using dbcc shrinkfile which does not do anything to the file at all.

The recovery mode is set to full and we use windows backup to backup the databases to an external hard drive.

Any ideas on how to get this file smaller?

Thanks
0
Comment
Question by:TreeMaster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 2000 total points
ID: 38865738
>Any ideas on how to get this file smaller?
You have to backup the database logs at regular intervals; dont stick with the windpws backup, you must create proper backup plans, full backup at least once /day or per week; regular log backups etc.

In order to shrink the file, change the recovery to simple do a log file shrink;
you also need to check the initial size of the log file, if it is set to 10gb, it wont shrink
0
 

Author Comment

by:TreeMaster
ID: 38865849
Would you recommend using  the SQLCMD via command line to do this?

sqlcmd -S.\SQLExpress -Q"BACKUP DATABASE dbName  TO DISK = 'path'"

I have been playing around with this and it seems to create a .bak file but if I run it again it will continue to add to the file.  Is there a way to make this a differential backup?
0
 

Author Comment

by:TreeMaster
ID: 38865859
I am using SQL Express if that helps
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 2000 total points
ID: 38865910
0
 

Author Comment

by:TreeMaster
ID: 38866022
Got it! thank you very much
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

719 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