PC Review


Reply
Thread Tools Rate Thread

ADO.NET connectionstring and pooling

 
 
njdude
Guest
Posts: n/a
 
      21st Feb 2007
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      21st Feb 2007
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

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"njdude" wrote:

> 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
>
>

 
Reply With Quote
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      21st Feb 2007
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

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"njdude" wrote:

> 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
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ADO.NET Connectionstring+pooling njdude Microsoft ADO .NET 1 21st Feb 2007 06:57 PM
ConnectionString Josep Solà Microsoft ADO .NET 6 21st Dec 2005 02:35 PM
ConnectionString No_So_Clever Microsoft ADO .NET 3 19th Dec 2005 04:04 PM
Connectionstring =?Utf-8?B?cGF0YW5n?= Microsoft VB .NET 3 11th Apr 2005 11:51 AM
connectionstring =?Utf-8?B?UmFqYW5p?= Microsoft ADO .NET 4 6th Dec 2004 10:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:32 AM.