Solved

SQL server 2005: Big LDF file

Posted on 2013-05-15
4
569 Views
Last Modified: 2013-05-16
Hi there,
I have a SQL server 2005 and I have a LDF file over 50Go.
How does it clean it ? Is it risks ?
Thanks,
Regards,
Simlip
0
Comment
Question by:simlip
4 Comments
 
LVL 25

Assisted Solution

by:jogos
jogos earned 125 total points
ID: 39170511
See in options of your db what recovery model is.

Most likely
If it is FULL you must take a transactionlog backup (that will take that full size) .  
Or simpler because you don't take transactionlog backups (to have a point in time restore) then you don't need a FULL-model so if you change it in recovery model SIMPLE then the transactions in the LDF will be released and the file stops from growing.
0
 
LVL 10

Assisted Solution

by:sqlservr
sqlservr earned 125 total points
ID: 39170545
If your databases  Recovery mode is in Full Recovery mode then you have to make practice of  taking Transaction log backup.
if your database is in SIMPLE recovery mode then check for open transaction
to check open transaction run
DBCC OPENTRAN In the selected databases.
0
 
LVL 69

Accepted Solution

by:
Qlemo earned 125 total points
ID: 39170551
The difference between Full/Bulk-logged recovery and Simple is that Simple holds transactions in the LDF only as long as needed (written completely into the MDF).
If the MDF gets lost, and you need recovery, you will have only the DB backup itself to do that. If you back your DB up once a day, you will have a DB backup which is at most 24 hours old.

Full/Bulk-logged however does not remove transactions from the LDF files, unless you perform a transaction log backup, as mentioned above. This mode makes sense if you need a more accurate backup, and can't or don't want to perform a frequent DB backup. Common schedule is e.g. DB backup once a day, and transaction log backups every few hours.
If the MDF file gets corrupt or lost, recovery is still possible up to the last transaction log backup, and if the LDF files are still intact, even to the most recent point in time.

For small DBs you usually do not want to care about transacton log backups, and Simple Recovery mode is your best choice in combination with a daily DB backup.
0
 
LVL 25

Assisted Solution

by:Lee Savidge
Lee Savidge earned 125 total points
ID: 39170665
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

816 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

9 Experts available now in Live!

Get 1:1 Help Now