?
Solved

SQL server 2005: Big LDF file

Posted on 2013-05-15
4
Medium Priority
?
586 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
[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
4 Comments
 
LVL 25

Assisted Solution

by:jogos
jogos earned 500 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:Ramesh Babu Vavilla
Ramesh Babu Vavilla earned 500 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 70

Accepted Solution

by:
Qlemo earned 500 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 500 total points
ID: 39170665
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Suggested Courses

762 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