Monday, August 31, 2009

MCTS 70-433 XACT_ABORT

To turn implicit transactions on (off is the default - unlike oracle):

SET XACT_ABORT { ON | OFF }


  Remarks

When SET XACT_ABORT is ON, if a Transact-SQL statement raises a run-time error, the entire transaction is terminated and rolled back.

When SET XACT_ABORT is OFF, in some cases only the Transact-SQL statement that raised the error is rolled back and the transaction continues processing. Depending upon the severity of the error, the entire transaction may be rolled back even when SET XACT_ABORT is OFF. OFF is the default setting.

http://msdn.microsoft.com/en-us/library/ms188792.aspx

No comments: