ADO.NET connectionstring and pooling

N

njdude

When i run this

sp_who

I see the connection showing up and in the next second it is gone.


The connectionstring i have is

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;pooling=true;Min Pool Size=2;Max Pool Size=50;Connection
Lifetime=120;Initial Catalog=test;Data Source=TESTMACHINE\SQLEXPRESS;


And then in the log, the log grows almost every second 3 entiries !!
"Login succeeded for user 'TESTMACHINE\User'. Connection: trusted...."
"Login succeeded for user 'TESTMACHINE\User'. Connection: trusted...."
"Login succeeded for user 'TESTMACHINE\User'. Connection: trusted...."


So the problem is that pooling does not seem to work. I dont see any
connections being held for more than 1 second
 
G

Guest

If you are referring to ADO.NET Connection pooling, that really doesn't work
on the actual SQL Server, its handled by ADO.NET itself in conjunction with
EnterpriseServices. So looking at the SQL Server isn't going to give you
relevant information.
If you want to find out if connection pooling is working, open 100
connections in a tight loop, all with the the same connection string. with
the default pool, you'll get an exception on the 101'st connection.
Peter
 
G

Guest

Correction:
Actually, I tried this for fun and it went all the way up to the 153rd open
connection before the pool was exhausted and I got a timeout exception. So
maybe they've upped the default number of connections in the pool for ADO.NET
2.0
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top