[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

SQL server 2005: Big LDF file

Posted on 2013-05-15
4
Medium Priority
?
592 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 71

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

650 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