Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Distributed transaction Expand / Collapse
Author
Message
Posted Wednesday, March 18, 2009 3:24 PM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Tuesday, May 07, 2013 6:56 AM
Points: 679, Visits: 953
Hi-
I have a dought about DTC (data transactions coordinator).




I have a view on my server.
Inside this view (the sql code), I make a select to objects of other server.
When I make a join between this view and other objects (tables) on my server, I do not have to activate de MSDTC.

I don’t understand why, because, the view makes a select to objects in other server, and then, the result of this select (the view) is joined and compared with objects of my server.

Isn’t this considered a distributed transaction?




When I trie to make a insert of the result of this join to a table on my server , then, the SQL Server asks for the activation of my msdtc.

But if I make a (SELECT INTO command) to a new table , of the result of the join, it’s not necessary to activate the MSDTC.


I really don’t understand why….

It’s only considered a distributed transaction if it has a insert ?

Tks,

Pedro
Post #678947
Posted Wednesday, March 18, 2009 4:50 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, May 28, 2013 10:16 AM
Points: 214, Visits: 615
A SELECT isn't included as a distributed transaction unless you explicitly do a BEGIN TRAN; developers sometimes do to keep the current connection. A SELECT INTO is minimally logged, so that might have something to do with it not starting a distributed transaction. Are you sure that it didn't? Check out Profiler, or open the MSDTC console and the run your SELECT INTO.




Lee Everest

Post #679000
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse