Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1799
  • Last Modified:

Connection Pooling

We've been having some SQL Server connection issues and one of our Active Directory admins suggested using connection pooling (we get a lot of timeout expired errors when connecting to any SQL Server 2005, we have 4).  I'm a programmer, and my .Net applications use this by default with ADO.Net (I've ran tests to verify this).  However, we also have ODBC reports that are run on an application server, and I believe they're pooling but I don't know for sure.  Also, I've checked the open connections on the server via both a netstat and running an sp_who2 query and I haven't seen an extraordinary amount of connections open.

1.)  Is there anything that needs to be done on the server to enable connection pooling?
2.)  Do the microsoft ODBC drivers behave like the ADO drivers and enable pooling by default (if not, can they be enabled/how)?
0
IUFITS
Asked:
IUFITS
  • 2
1 Solution
 
Faiga DiegelSr Database EngineerCommented:
Check your SQL Query wait. right click on the server instance >> Properties >> Advanced.
Check the Query Wait value.
0
 
jabcocoCommented:
From a asp.net web application all you need to do is modify your web.config connection string and add "Min Pool Size,Max Pool Size & Connect Timeout" values.

Ref:
http://www.15seconds.com/Issue/040830.htm
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx
http://msdn.microsoft.com/en-us/library/8xx3tyca.aspx

Hope this help.

conn.ConnectionString = "integrated security=SSPI;SERVER=YOUR_SERVER;DATABASE=YOUR_DB_NAME;Min Pool Size=5;Max Pool Size=60;Connect Timeout=2;";

Open in new window

0
 
IUFITSAuthor Commented:
I'm going to accept jabcoco's answer... though it didn't exactly answer my question, he did link to an article that had a link in it that had the information I needed.  I'm going to include the verbiage from the part that helped me for posterity (this explains how connection pooling behaves with ODBC):
Connection Pooling for Odbc
Connection pooling for the .NET Framework Data Provider for ODBC is managed by the ODBC Driver Manager that is used for the connection, and is not affected by the .NET Framework Data Provider for ODBC.
To enable or disable connection pooling, open ODBC Data Source Administrator in the Administrative Tools folder of Control Panel. The Connection Pooling tab allows you to specify connection pooling parameters for each ODBC driver installed. Note that connection pooling changes for a specific ODBC driver affect all applications that use that ODBC driver.  
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now