March 24, 2005 at 4:48 am
Dear all,
Could somebody explain the difference between BEGIN TRANSACTION and BEGIN DISTRIBUTED TRANSACTION. Obviously, BEGIN TRANSACTION creates a local transaction and BEGIN DISTRIBUTED TRANSACTION creates a distributed transactions.
I've always used BEGIN TRAN when running T-SQL statements that refer/update tables on a remote server (via a Linked Server). I can watch the transaction being picked up in the DTC when I issue the transaction.
Is my understanding of this correct or should I always use BEGIN DISTRIBUTED TRANSACTION when working with Linked servers and transactions etc.
Cheers,
Stephen
March 24, 2005 at 9:59 am
From books online.
BEGIN TRANSACTION starts a local transaction. The local transaction is escalated to a distributed transaction if the following actions are performed before it is committed or rolled back:
That's why you see the transaction being picked up by DTC.
March 31, 2005 at 3:07 am
Addict,
Thanks for you response.
Should really have looked in BOL myself, really.
Cheers,
Stephen
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply