Groups | Blog | Home
all groups > sql server (alternate) > july 2004 >

sql server (alternate) : Min pool size


Konstantinos Michas
7/14/2004 2:35:39 PM
Hello Experts,

I make a connection with .Net Sqlclient Data Provider to
my server and I adjust the min pool size = 0, but when I
check the sysprocesses I see that 2 connections have been
made. Why is that? am I missing something here?

Conn. string
"server=MYSERVER;user id=sa;database=MYDB;min pool
size=0;max pool size=10;packet size=3072;Application
Name=MYAPP"

Thanks in advance

Michas Konstantinos
SQL Sewrver Developer, DBA

*** Sent via Developersdex http://www.developersdex.com ***
Erland Sommarskog
7/18/2004 9:59:58 PM
Konstantinos Michas (k_michas@hotmail.com) writes:
[quoted text, click to view]

Min pool size = 0 is the default, so getting two connections is
nothing strange. If you would set Max pool size = 1, you would get
slapped in the face, when you try to get a second connection.

If you have two connections, but you are only expecting one, you are
probably not closing the connection properly. Be sure if you use
ExecuteReader to get all rows and all result sets.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
AddThis Social Bookmark Button