Solved

Very Large LDF File

Posted on 2013-02-07
5
399 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
  • 3
  • 2
5 Comments
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 500 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 500 total points
ID: 38865910
0
 

Author Comment

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

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

813 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now