Persistent Connections? Connection Pooling? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Persistent Connections? Connection Pooling?

I’m very new to SQL Server, having only used MS Access before. What, if any, is the difference between perisistent connections and connection pooling? Also, I can’t seem to find any articles about how to actually implement either of them. I am using ASP.NET (C#) to develop a web application.
I only have experience of persistent connections using MySql and PHP, so Im not really aware of what they mean in an MSSQL environment. Do you mean simply keeping a connection open during the lifetime of the application? This is often not a good idea, especially if you have a high usage server, but there are some times when you may want to do it. Connection pooling is your OLEDB providers ability to reuse a connection after it has been disconnected by the client application, but another request for a similar connection is then requested. Its a bit like thread pooling whereby the overhead of creating a new connection from scratch would be greater than the overhead of reusing the connection, however there are fairly strict conditions on how to write your connection strings to enable them to be reused. I read a useful article on these conditions recently, Ill see if I can dig it out. For connection pooling, you dont need to do anything. ADO.NET will pool connections by default, but like I say you need to be aware of how to NOT write connection strings which will defeat this process. We have a forum specific for client languages, this thread belongs there really

As most of it covered by Chappy, I’m supporting them with the articles for further information:
http://www.15seconds.com/issue/040830.htm
http://www.sql-server-performance.com/asp_net_performance.asp
http://www.developerfusion.com/show/4278/
http://msdn.microsoft.com/library/e…nectionPoolingForSQLServerNETDataProvider.asp
http://msdn.microsoft.com/library/e…nectionPoolingForSQLServerNETDataProvider.asp (And thread moved to the relevant forum as suggested from General DBA section) Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Thanks guys, this is very helpful!
]]>