简体   繁体   English

SQL Server连接字符串的连接池设置

[英]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). 我维护一个传统的ASP.Net Web应用程序(使用.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): 以下是旧版应用程序正在使用的连接字符串(旧版应用程序使用SQL Server身份验证模式):

"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, Ie connection pool is not used by the ADO.Net application. 即使存在冲突的设置,我认为pooling = false生效,即ADO.Net应用程序不使用连接池。

Is my understanding correct? 我的理解是否正确?

Yes. 是。 You are right. 你是对的。 if pooling = false, the max pool size will not take effect. 如果pooling = false,则最大池大小不会生效。 but the connection is not necessarily wrong. 但连接不一定是错的。 it is still valid. 它仍然有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM