T-Log Backup: Includes updates in a batch ?

  • If I run a big update statement that takes 30 minutes to run and updates 10,000,000 records, and I run t-Log backups every 10 minutes, do the t-log backups running during the update include trans from the update ? Or, since the update is all 1 batch, is it logged by the first t-log backup after the update completes ?

  • a transaction won't be part of a log backup until it is committed and therefore becomes inactive.

    So if your update is one transaction none of it will be included in a log backup till it completes.

    ---------------------------------------------------------------------

  • I feel the need to clarify that............

    the activity so far will be in the log backup, but if you restore with recovery it will be rolled back if it had not yet been committed. so you cannot restore it until you have a log backup post the commit.

    ---------------------------------------------------------------------

  • George is correct. Also, the log backups will not reuse the space until the transaction commits.

    You might want to break it into batches if you are worried about log growth.

  • Thanks for the replies.

    I am breaking the jobs into batches ... very tedious :crazy:

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

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