问题
I have asked a question about "Incr Pool Size" or "Decr Pool Size"
How to resolve SqlConnection error "Keyword not supported: 'decr pool size'."
This is another but different question related to that , in brief ORACLE connection string provides these two option to increase/decrease connection objects when connection pool is empty or full respectively. how can we achieve this with SQL.
EDIT: Why I want to know because I am creating a middleware where I am writing to database using multiple parallel threads (e.g. 60), what I am thinking is when all my connections from pool (e.g. 50) are in use and new bunch of threads try to create connection will sql server will create another bunch of connection in pool i.e. 50 or will it create this exceeding connection one by one?
回答1:
The SqlClient manages the pool size automatically, whithin the MaxPoolSize and MinPoolSize parameters provided. The default values are 100 and 0, respectively.
来源:https://stackoverflow.com/questions/11429562/how-to-achieve-functionlity-i-e-controlling-incr-pool-size-or-decr-pool-size