Search code examples
c#asp.netsql-server-2005ado.net.net-2.0

Connection pool setting of SQL Server connection string


I maintain a legacy ASP.Net Web application (using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 + C# + ADO.Net). Here is the connection string the legacy application is using (the legacy application is using SQL Server authentication mode):

"server=***;database=***;uid=***;pwd=***;pooling=false;max pool size=100"

I think the connection string is wrong because:

  1. Since the setting of pooling is false, but it also set pool size -- conflicting.
  2. Even if there are conflicting settings, I think pooling = false takes effect, I.e. connection pool is not used by the ADO.Net application.

Is my understanding correct?


Solution

  • Yes. You are right. if pooling = false, the max pool size will not take effect. but the connection is not necessarily wrong. it is still valid.