Distributed transaction

  • 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

  • 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.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply