Will a transaction that is trying to write something into the transaction log be rolled back if the transaction log is full?
4 Answers
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.
Yes.
The log entry is needed to rollback (or server fail etc) so all the changes must be recorded.
YES. check this KB http://support.microsoft.com/kb/110139
-
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.– db2Commented Jan 4, 2012 at 18:52
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.