SQL 2005 Distributed Transaction

  • Hello.

    I have a problem that when I call SQL from a WCF service, it performs and update against a table. Withing the same transaction scope with the same distributed transaction identifier makes a further call the the database to update data against the same record in the table I get a block as the second call to SQL is waiting for the first call to complete the transaction.

    Although I'm using 2 connections, I'm still using the same transaction and I thought that I would still be able to update or read the non committed data from the previous update even when running a Read Committed isolation.

    Am I wrong in believing this. There seams to be a distinct shortage of solid information regarding SQL 2005 transaction management with DTC so I'm hoping someone could clear things up for me

    I have an open forum discussion in Microsoft MSDN but so far there seams to be little knowelege. The link is here is anyone is interested in gaining further information to my problem

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2720839&SiteID=1

    Thanks in advance for any help.

    Andy

  • You are wrong. DTC will not allow two different connections enlisted in the same distributed transaction read uncommitted data from each other without READ UNCOMMITTED or NOLOCK being used.

    The locking mechanism in SQL will allow this if you are within the same SQL transaction, but the operations would have to be from the same connection.

  • One more thing - if you look for DTC Deadlocks on google, I think you will find some related information. DTC can deadlock and even self-deadlock and hang until the DTC timeout is reached.

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

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