It's like the difference between an apple and bicycle. That is, they are not the same at all.
BEGIN TRANSACTION starts a transaction, and this transaction will remain option until it commits or rolls back. In the latter cases, all updates performed after BEGIN TRANSACTION will be rolled back. Also, until, you commit the transaction, the changes performed in the transaction is only visible to the process running the transaction.
SET XACT_ABORT ON does not start a transactions, so subsequent updates are visible to all processes and cannot be rolled back.
SET XACT_ABORT ON controls what happens on an error. With the default setting, XACT_ABORT OFF, any of these things can happen if there is an error during execution:
- The connection is closed. (Internal error in SQL Server.)
- Execution is aborted, and any open transaction is not rolled back.
- Execution is aborted, but any transaction is left open.
- The current scope is aborted, and execution continues on the next statement in the invoking scope. There is no roll back.
- Execution continues on the next statement. The statement is rolled back, but any open transaction is not.
With XACT_ABORT ON, only 1 and 2 can happen. Well, almost. There are a few errors, where XACT_ABORT is ignored, and nothing is terminated.