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 ***
Don't just participate in USENET...get rewarded for it!Konstantinos Michas (k_michas@.hotmail.com) writes:
> 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"
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
http://www.microsoft.com/sql/techin.../2000/books.asp
No comments:
Post a Comment