XACT_ABORT and transactions : XACT_ABORT « System Settings « SQL Server / T-SQL Tutorial






4> SET XACT_ABORT ON
5> BEGIN TRANSACTION
6> GO
1> SELECT 1/0 AS DivideByZero
2> GO
Msg 8134, Level 16, State 1, Server J\SQLEXPRESS, Line 1
Divide by zero error encountered.
1> SELECT @@TRANCOUNT AS ActiveTransactionCount
2> GO
ActiveTransactionCount
----------------------
                     0

(1 rows affected)
1>
2>
3>








26.43.XACT_ABORT
26.43.1.Modifying exception types with XACT_ABORT
26.43.2.XACT_ABORT in a stored procedure
26.43.3.XACT_ABORT and transactions