October 2003
Intermediate to advanced
1072 pages
24h 21m
English
SQL Server supports four basic types of transactions: automatic, implicit, user-defined, and distributed. Each has its own nuances, so I'll discuss each one separately.
By default, each Transact-SQL command is its own transaction. These are known as automatic (or auto-commit) transactions. They are begun and committed by the server automatically. A DML command that's executed outside of a transaction (and while implicit transactions are disabled) is an example of an automatic transaction. You can think of an automatic transaction as a Transact-SQL statement that's ensconced between a BEGIN TRAN and a COMMIT TRAN. If the statement succeeds, it's committed. If not, it's rolled back.
Read now
Unlock full access