SQLConfiguration SQLConfiguration


Transactions Locks «Prev 

BEGIN DISTRIBUTED TRANSACTION syntax

Applies To: SQL Server 2014, SQL Server 2016 Preview

Specifies the start of a Transact-SQL distributed transaction managed by Microsoft Distributed Transaction Coordinator (MS DTC).
Syntax
BEGIN DISTRIBUTED { TRAN | TRANSACTION } 
[ transaction_name | @tran_name_variable ] 
[ ; ]

Arguments

  1. transaction_name: Is a user-defined transaction name used to track the distributed transaction within MS DTC utilities. transaction_name must conform to the rules for identifiers and must be <= 32 characters.
  2. @tran_name_variable: Is the name of a user-defined variable containing a transaction name used to track the distributed transaction within MS DTC utilities. The variable must be declared with a char, varchar, nchar, or nvarchar data type.

transaction_name is the name of your transaction. This is only used in the case of nested transactions so that they can be distinguished from each other, but is only used for the outer-most transaction.

@transaction_variable is the name of your transaction as stored in a variable.