What is Maximum Pool Size in ADO.NET Connection String ?

 Posted by Bharathi Cherukuri on 5/22/2012 | Category: ADO.NET Interview questions | Views: 18463 | Points: 40
Answer:

Maximum pool size decides the maximum number of connection objects to be pooled. If the maximum pool size is reached and there is no usable connection available the request is queued until connections are released back in to pool.
So it is always a good habit to either call the close or dispose method of the connection as soon as you have finished work with the connection object.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Akiii on: 5/23/2012 | Points: 10
Good question @Bharathi.......

Is there any number like 50 or 100 ?


Thanks and Regards
Akiii
Posted by: Bharathi Cherukuri on: 5/23/2012 | Points: 10
Hi Akiii,

The default value of Max Pool size is 100. You can set it to a higher number also so far as performance of the server is not a issue.

A sample connection string for SQL Server:

DATA SOURCE=(LOCAL);Initial Catalog=w3mentorDB;User ID=root;Password=****;Max Pool SIZE=75;Min Pool SIZE=5;


Regards,
Bharathi
Posted by: Akiii on: 5/23/2012 | Points: 10
Excellent Bharathi.....

Thank you very much...
Regards
Akiii

Login to post response