How to achieve functionlity i.e. controlling “Incr Pool Size” or “Decr Pool Size” while establishing connection to SQL? similar to ORACLE

家住魔仙堡 提交于 2020-01-05 08:38:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!