PROMOTE TRANSACTION request failed because local transaction is not active

Under what circumstances will I see the above message? I have one SQL Server call wrapped in a TransactionScope call. In our development environment and QA, MSDTC is disconnected and the call succeeds. However, in our production environment with MSDTC enabled, we fail with this call. Is there something that can cause this when I'm sure that we are not looking at a distributed transaction call at all?

+3
source share
1 answer

So the problem was that we had a CreateTransaction call around an AND TransactionScope call. So we had 2 transactions. I did not think that this would cause this type of problem until I realized that when the error occurred, we would get two ROLLBACK calls. The second one will cause the aforementioned error message and actually hide the first. We found this by running SQLProfiler looking for "user error messages"

+4
source

Source: https://habr.com/ru/post/1781545/


All Articles