2

Will a transaction that is trying to write something into the transaction log be rolled back if the transaction log is full?

4 Answers 4

2

Yes but it will be the rollback which actually causes the log to become physically full.

As a transaction generates log records, it will also reserve space in the log for any records required required to rollback. With 20MB of log space remaining and a hypothetical transaction that generates 10MB of log records, you would receive the log full error with 10MB still free and the rollback would then consume that 10MB.

1
  • Nice info on the log space reservation for rollback. Commented Jan 5, 2012 at 21:45
0

Yes.

The log entry is needed to rollback (or server fail etc) so all the changes must be recorded.

0

YES. check this KB http://support.microsoft.com/kb/110139

1
  • That KB article is for SQL Server 6.5, 6.0, and 4.21. It may still be correct and relevant to some degree, but I wouldn't bet any production databases on it.
    – db2
    Commented Jan 4, 2012 at 18:52
0

In sybase you have "abort tran on log full" db_option to choose what to do.

In SQL Server you can't really choose, the rollback is made.

Your Answer

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