September 17, 2004 at 3:59 pm
I have a problem about DTC. I know where the problem is but don't know how to resolve it. I have two linked servers and I am performing Distributed Transaction on certain tables.
The following is the DTC SQL query
--------------------------------------------------------
BEGIN DISTRIBUTED TRANSACTION
SET XACT_ABORT ON
INSERT INTO linkedserver1.dbname.dbo.tableA
SELECT * from tableA
INSERT INTO linkedserver1.dbname.dbo.tableB
SELECT * FROM tableB
-- This is where the problem is
INSERT INTO linkedserver2.dbname.dbo.tableA
SELECT * FROM tableA
--
INSERT INTO linkedserver2.dbname.dbo.tableB
SELECT * FROM tableB
IF @@ERROR = 0
COMMIT TRANSACTION
ELSE
ROLLBACK TRANSACTION
---------------------------------------------------------
When I execute this query from QA, it gives me error at the step where I have written comment (--this is where the problem is). If I comment out those two lines, the DTC works fine. However when I try to run those two lines outside the DTC, it works.
Why is it doing that?
September 18, 2004 at 11:00 am
What error are you getting?
September 19, 2004 at 3:17 pm
Error: SQL Server does not exist or access denied
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply