Solved

Very Large LDF File

Posted on 2013-02-07
5
396 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
Comment Utility
>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
Comment Utility
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
Comment Utility
I am using SQL Express if that helps
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
Comment Utility
0
 

Author Comment

by:TreeMaster
Comment Utility
Got it! thank you very much
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

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, …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 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

10 Experts available now in Live!

Get 1:1 Help Now