February 29, 2016 at 8:35 am
Hello Everyone,
I have a .net c# 2.0 web application. We changed the DB from SQL server 2005 to 2008 r2.
Now on one of the main functionality (button click) we get below error:
"The transaction operation cannot be performed because there are pending requests working on this transaction".
Though this error comes on a webservice call , but I found this is because of DB change. When I rollback changes to point to SQL Server 2005 , everything works fine.
Now, when I put "Enlist = false" in my DB connectionstring , this issue is resolved.
My Questions:
1. What is the impact of having Enlist=false in the DB connectionstring?
2. Why is it needed for SQL server 2008 only, as it works without Enlist on SQL 2005.
Any suggestions would be helpful
February 29, 2016 at 10:37 am
Read this article, and it may help illuminate things:
It is rather old, but it does explain things from a .NET 2.0 point of view, as at the time it was written, SQL 2008 didn't even exist yet. I'm just thinking that if you understand what it is saying, you might understand why the older .NET framework might not interact with SQL 2008 quite the same way it does with 2005. Unfortunately, I don't know enough about .NET to know exactly what's going on, but from reading that article, it does appear that it may be the nature of SQL 2008 to interact with .NET 2.0 transactionally by default, and thus the need to use Enlist=False to overcome it. I'm not entirely confident that this is what's going on, but I strongly suspect that something to do with transactions and default behaviors is where the problem is coming from.
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply