Shrinking the log file

  • Backup log with truncate only will discard inactive transaction log entries from the tran log. This frees up space within the log file that can then be released to the OS when you shrink

    If you're running regular log backups then you generally don't want to do that, as it breaks the log chain. You won't be able to do more log backups afterwards until a full/diff backup is run, and you won't be able to do a point-in-time restore of the DB to a point between the truncate and the next full/diff backup.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • To this I can add that doing a regular log backup (ie. without truncate_only) does exactly the same thing - except that inactive log entries are backed up rather than discarded. (Unless, of course, you are backing up with no_truncate - in which case you don't free up anything no matter how much you back it up...:P )


    Kind regards,

    Vegard Hagen
    Norwegian DBA, occasional blogger and generally a nice guy who believes the world is big enough for all of us.
    @vegard_hagen on Twitter
    Blog: Vegards corner (No actual SQL stuff here - havent found my niche yet. Maybe some day...)

    It is better to light a candle than to curse the darkness. (Chinese proverb)

Viewing 2 posts - 16 through 16 (of 16 total)

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