473,387 Members | 1,388 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

connection pooling with SQL Server

Where is the connection pooling done when using ADO.NET and SQL Server? On
the SQL Server or where the .NET run-time is being executed? I'm assuming
on SQL Server as this would minimize the number of connections needed in the
pool.

Thanks in advance.

Mark
Nov 16 '05 #1
6 3773
Hi,

"Pooling" means that a connection is kept open after you close it and is
reuser later, therefore both ends are involved. In the client it;s handle by
the provider and in the server by the SQL server, even as I thiink that all
of the pooling features are handled in the client, the server all it sees is
a open connection, it has no ideas if the connection is being used by the
app or just kept by the data provider.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
Where is the connection pooling done when using ADO.NET and SQL Server? On the SQL Server or where the .NET run-time is being executed? I'm assuming
on SQL Server as this would minimize the number of connections needed in the pool.

Thanks in advance.

Mark

Nov 16 '05 #2
The connection pooling is performed just inside your application, by keeping
your disposed connections open and reattached the next time you request a
new connection with the same connection string.

As for the server, I can't imagine know how do you expect it to perform
connection pooling. The server usually only accepts connections and as such
is the passive element.

HTH,
Stefan

"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
Where is the connection pooling done when using ADO.NET and SQL Server?
On
the SQL Server or where the .NET run-time is being executed? I'm assuming
on SQL Server as this would minimize the number of connections needed in
the
pool.

Thanks in advance.

Mark

Nov 16 '05 #3
Stefan,

Actually, this isn't correct. If you do a trace on SQL server in an
environment that uses connection pooling, you will notice that there is a
stored procedure that is called when the connection is retreived from the
pool named sp_reset_connection.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Štefan Šimek" <si********@kascomp.blah.sk> wrote in message
news:u0**************@TK2MSFTNGP12.phx.gbl...
The connection pooling is performed just inside your application, by
keeping your disposed connections open and reattached the next time you
request a new connection with the same connection string.

As for the server, I can't imagine know how do you expect it to perform
connection pooling. The server usually only accepts connections and as
such is the passive element.

HTH,
Stefan

"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
Where is the connection pooling done when using ADO.NET and SQL Server?
On
the SQL Server or where the .NET run-time is being executed? I'm
assuming
on SQL Server as this would minimize the number of connections needed in
the
pool.

Thanks in advance.

Mark


Nov 16 '05 #4
I haven't looked into this, but it sounds like the client pooling code
is just calling sp_reset_connection before it hand a active connection out
to another processes (with the server still completely in to dark about
what's going on).

--
Truth,
James Curran
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
(note new day job!)

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@tk2msftngp13.phx.gbl...
Stefan,

Actually, this isn't correct. If you do a trace on SQL server in an
environment that uses connection pooling, you will notice that there is a
stored procedure that is called when the connection is retreived from the
pool named sp_reset_connection.

Nov 16 '05 #5
That's the point though, if the SP is called on the server, then that
definitely alerts the server to something, no? =) It just resets the
session properties on the server end.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"James Curran" <Ja*********@mvps.org> wrote in message
news:ON**************@TK2MSFTNGP12.phx.gbl...
I haven't looked into this, but it sounds like the client pooling code
is just calling sp_reset_connection before it hand a active connection out
to another processes (with the server still completely in to dark about
what's going on).

--
Truth,
James Curran
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
(note new day job!)

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in
message news:%2****************@tk2msftngp13.phx.gbl...
Stefan,

Actually, this isn't correct. If you do a trace on SQL server in an
environment that uses connection pooling, you will notice that there is a
stored procedure that is called when the connection is retreived from the
pool named sp_reset_connection.


Nov 16 '05 #6
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:u6**************@TK2MSFTNGP09.phx.gbl...
That's the point though, if the SP is called on the server, then that
definitely alerts the server to something, no? =) It just resets the
session properties on the server end.


"Something", yes, but what? How would it know the different between a
connection being passed from one process to another, and a single process
doing multiple actions, and just calling that SP between them?

--
Truth,
James Curran
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
(note new day job!)
Nov 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Harry | last post by:
Using Oracle 8i enterprise on win 2000 (sp3) Installed the standard configuration & whenever I make a connection it takes about 10 secs. It's running on a P1900 with 1gb Ram so no reason there...
1
by: Mark | last post by:
I know that DB2 LUW version 8 has "connection pooling" that provides a connection concentrator (limits the number of simultaneous connections that can occur). But does it really provide connection...
4
by: Mark | last post by:
OK. Here we go. I have an ASP.NET application that does many hits to a SQL Server DB on a separate server. When I first created this application (2 years ago) and was very new to ASP/ASP.NET, to...
1
by: Grey | last post by:
is the connection pooling mechanism set default in the normal connection string, i.e. "Provider=SQLOLEDB;Server=SERVER_NAME;User ID=sa;Password=;Database=DB_NAME" If not, what is the difference...
4
by: Susan Baker | last post by:
PHP Newbie here - I apologize if any of my questions appear daft or obvious ... Does PHP (or maybe the web server - Apache in my case), support (database) connection pooling?. It seems terribly...
3
by: Martin B | last post by:
Hallo! I'm working with C# .NET 2.0, implementing Client/Server Applications which are connecting via Network to SQL-Server or Oracle Databases. To stay independent from the underlaying Database...
16
by: crbd98 | last post by:
Hello All, Some time ago, I implemented a data access layer that included a simple connectin pool. At the time, I did it all by myself: I created N connections, each connection associated with...
20
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
3
by: fniles | last post by:
In the Windows application (using VB.NET 2005) I use connection pooling like the following: In the main form load I open a connection using a connection string that I stored in a global variable...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.