如何实现functionlity即控制"增量池大小"或QUOT; DECR池大小"同时建立连接到SQL?类似于Oracle [英] How to achieve functionlity i.e. controlling "Incr Pool Size" or "Decr Pool Size" while establishing connection to SQL? similar to ORACLE

查看:326
本文介绍了如何实现functionlity即控制"增量池大小"或QUOT; DECR池大小"同时建立连接到SQL?类似于Oracle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾问一个关于增量池大小或DECR池大小

I have asked a question about "Incr Pool Size" or "Decr Pool Size"

<一个href="http://stackoverflow.com/questions/11427362/how-to-resolve-sqlconnection-error-keyword-not-supported-decr-pool-size/11427442#comment15077277_11427442">How解决的SqlConnection错误&QUOT;关键字不支持:DECR池大小'&QUOT;

这是另一种,但不同的问题涉及到的是,在短暂的Oracle连接字符串提供了这两个选项来增加/减少连接对象时,连接池分别为空或满。如何才能与SQL实现这一目标。

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.

编辑:为什么我想知道,因为我创建一个中间件,我现在用的多线程并行写入数据库(如60),我在想什么的时候,从池中所有的连接(如50)都在使用,新的一堆线程尝试建立连接将SQL Server将创建另一个一堆池连接,即50还是会由一个创建这个超连接吗?

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?

推荐答案

在SqlClient中自动管理池的大小,whithin的<一个href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder.maxpoolsize"相对=nofollow> MaxPoolSize 和<一href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder.minpoolsize"相对=nofollow> 了MinPoolSize 提供的参数。的默认值是100和0。

The SqlClient manages the pool size automatically, whithin the MaxPoolSize and MinPoolSize parameters provided. The default values are 100 and 0, respectively.

这篇关于如何实现functionlity即控制&QUOT;增量池大小&QUOT;或QUOT; DECR池大小&QUOT;同时建立连接到SQL?类似于Oracle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆