What is LDF file?

  • Tell me Clear idea of LDF file , I mean what it has inside and role of the file?

    Thanks in advance..

  • It contains the transaction log for a database and is a required file for each database..

    CEWII

  • Can we clear the log file ,, Its make any loss of data in mdf?

  • You can't fully clear it. Data is written here BEFORE it is written to the MDF. Depending on the recovery mode of the database it may not be shrinkable..

    If the recovery mode is simple then you might be able to try:

    DBCC SHRINKDATABASE( databasename )

    Otherwise you will need to so a full backup then a transaction log dump.. then you can probably shrink it up.

    CEWII

  • Just to point out to you as well, you shouldnt have a need to clear the transaction log, shrinking the log can cause performance problems. look at the link ''managing transaction logs" at the bottom of my post for more information on transaction logs.

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply