0

I'm reading the documentation for sp_flush_log, which states:

Flushes to disk the transaction log of the current database, thereby hardening all previously committed delayed durable transactions.

Will sp_flush_log also cause log records of uncommitted transactions to be written to disk?

1
  • Are you using Delayed Durability transactions? Commented Aug 28, 2022 at 4:23

1 Answer 1

3

Will sp_flush_log also cause log records of uncommitted transactions to be written to disk?

It might, as a side-effect.

Any log blocks flushed to harden delayed durability transactions might also contain log records for uncommitted transactions.

This doesn't affect the state of those transactions, just whether their log records are in memory or on disk. The effect of any uncommitted transactions would be undone at recovery time as usual.

See The SQL Server Transaction Log, Part 2: Log Architecture by Paul Randal.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.