我正在尝试理解池化理论。 ADO.NET 和 SQL Server 之间的交互要好得多,但尚未找到明确的答案。我一直假设每个进程,但我突然想到它可能是每个应用程序域。
任何深入的引用资料也将不胜感激。
最佳答案
连接池是一个复杂的野兽,因为它们是在几个不同的范围内创建的。根据SQL Server Connection Pooling在 MSDN 上:
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.
这意味着您可以根据连接的方式和位置在同一应用程序中拥有多个连接池。
关于sql-server - Ado.net (2.0+) 连接池是在应用程序域之前还是每个进程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3526617/