Ado.net(2.0+)连接池是在Application Domain之前还是在每个进程中 [英] Are Ado.net (2.0+) Connection Pools pre Application Domain or per Process

查看:54
本文介绍了Ado.net(2.0+)连接池是在Application Domain之前还是在每个进程中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图了解合并理论ADO.NET和SQL Server之间的交互作用要好得多,并且还没有找到确切的答案。我一直以为每个进程都可以,但是我偶然发现它可以是每个AppDomain。

I'm trying to understand the pooling theory w.r.t. to interactions between ADO.NET and SQL Server much better and haven't found the definitive answer. I have always assumed per process but it's just occurred to me that it could be per AppDomain.

任何深度参考也将受到赞赏。

Any in depth references would also be appreciated.

推荐答案

连接池是一个复杂的野兽,因为它们是在几个不同的范围内创建的。根据MSDN上的 SQL Server连接池

Connection pools are a complicated beast in that they are created in several differing scopes. According to SQL Server Connection Pooling on MSDN:


每个进程,每个应用程序域,每个连接字符串以及使用集成安全性时,每个Windows标识的连接池都将被池化。连接字符串也必须完全匹配;

Connections are pooled per process, per application domain, per connection string and when integrated security is used, per Windows identity. Connection strings must also be an exact match; keywords supplied in a different order for the same connection will be pooled separately.

这意味着您可以在同一个连接中拥有多个连接池基于连接方式和位置的应用程序。

This means that you could have several connection pools within the same application based on how and where the connection is made.

这篇关于Ado.net(2.0+)连接池是在Application Domain之前还是在每个进程中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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