Log Shipping Truncate Log File

  • Good Morning,

    I have read that taking a log backup truncates the log file. In Log shipping, we set up automated log backups. So, my doubt is whether these log backups also truncate log file?

  • If you have a database in a logshipping configuration you must stop all other log backups from happening, otherwise you break the log chain and logshipping fails.

    If you are using Ola's scripts, they will automatically exclude anything in a logshipping config.

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • Not quite - the transaction log will be truncated after a log backup has occurred *and* there are no open transactions in the previous VLF's.  The log also cannot be truncated if you have an availability group - and the transactions have not been hardened on the secondary.

    If your question is related to the size of the transaction log then you should know that truncation <> shrink, meaning the log file will not shrink upon truncation.  All truncation does is marks a VLF as reusable within the file and SQL Server rolls over to the beginning of the file once it gets to the end.  If all VLF's are in use when SQL Server fills up the last available VLF - then the transaction log will grow.

    Jeffrey Williams
    Problems are opportunities brilliantly disguised as insurmountable obstacles.

    How to post questions to get better answers faster
    Managing Transaction Logs

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

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