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://msdn.microsoft.com/library/e…nectionPoolingForSQLServerNETDataProvider.asp (And thread moved to the relevant forum as suggested from General DBA section) Satya SKJ
This posting is provided â€œAS ISâ€ with no rights for the sake of knowledge sharing.
Thanks guys, this is very helpful!