Handle Transaction -
04-12-2008
, 05:30 PM
Just want to clarify one thing before i have to BEGIN DISTRIBUTED
TRANSACTION on production boxes. here is an example.
SET xact_abort ON
BEGIN DISTRIBUTED TRANSACTION
UPDATE Table on LocalServer
UPDATE Table on RemoteServer
COMMIT
Should I implement the error handling right after each updates? to make sure
both the transaction successfully works then COMMIT everything else ROLLBACK
every thing.
I can give you one example, I want to Withdraw the money from one account
which is on Database1 and I want to deposit the amount which is Datbase2. I
want to make sure if deposit the transaction succcessfully completed then it
will commit the transaction.
Please advice, how I can do with BEGIN DISTRIBUTED TRANSACTION
Thanks |