October 14, 2003 at 11:18 am
I'm a DBA who is trying to debug some SQL Server-ADO.NET connection problems that our developers have. I don't know if this is related to connection pooling.
Some of their pages will reuse an open SQL Server connection, whereas others will spawn new connections for every database call. They all swear they're closing connections and disposing of objects, and from what I've seen of the code that's true. All the code is using the exact same connection string, which is stored in a separate place.
I've stepped through some of the code while I had Profiler open, just to see where new connections were occurring. We're stumped. Maybe it could have something to do with instantiation of a new class?
One thing we noticed is if the Try...Catch..Finally code is missing (all else being the same), a new connection will be opened for every database call.
Anyone have any guidelines for how to get ADO.NET to reuse its connections to SQL Server? I've read a ton about connection pooling, but that doesn't seem to apply here.
October 17, 2003 at 8:00 am
This was removed by the editor as SPAM
October 27, 2003 at 3:22 am
Here is my humble offering
The connection string must contain pooling = true and min connections and max connections
Does the connection string explicitly state these properties as pooling is set as false by default....
If it aint broke don't fix it!
Andy.
October 27, 2003 at 6:47 am
Hmmm... I thought pooling was by default true. That's what my book says. But it's something to try. Thanks.
October 31, 2003 at 12:53 am
You are correct. I must have been smoking my socks....
If it aint broke don't fix it!
Andy.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply