开发者

The PROMOTE TRANSACTION request failed because there is no local transaction active

Under what circumstances would I see the above message? I have a sin开发者_开发问答gle call to SQL Server which is wrapped in a call to TransactionScope. In our development and QA environments MSDTC is turned off and the call succeeds fine. However, in our production environment with MSDTC turned on we are failing with this call. Is there something that would cause this when I am sure we are not looking at a distributed transaction call at all?


Ok, so the problem was that we had a CreateTransaction call around the call AND a TransactionScope. So we DID have 2 transactions. I didn't think that this would cause this type of problem until I realized that when there was an error we would end up with two ROLLBACK calls. The second one would trigger the above error message and effectively hide the first. We found this by running SQLProfiler looking for "User Error Messages"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜