In our application we're using TransactionScope's. We're aiming to not use the MSDTC service because it's a lot slower than lightweight transactions.
using (var transactionScope = new TransactionScope())
{
...
transactionScope.Complete();
}
While connected to the test database we need no MSDTC but the exact same code, executed on the same machine, escalates to use MSDTC when connected to the production or development database.
The development database is not clustered and isn't a named instance.
All are SQL Server 2008 (10.50.2500) and the connection strings are exactly the same except for the hostnames.
It seems there has to be some difference in the setup of the databases. Any ideas on what that could be?
EDIT
The transaction was there to protect inserts in two different tables. I noticed that there was also two calls that resulted in two selects in there. There was no need for these to be in the transaction so I moved them outside of it. The need for MSDTC then disappeared in all three databases. Problem solved but without really knowing what caused it.