ABHI GUPTA
What is a pre-requisite for connection pooling?
By ABHI GUPTA in ADO.NET on Oct 04 2013
  • Bharathi Raja
    Jan, 2018 20

    Assuming you mean database connections, the main points are:they must all use exactly the same connection string it is per-AppDomain for SSPI etc, the implicit user account must be common (i.e. the same domain user is being represented, or it will form multiple pools) it must be enabled and supported by the provider; in the case of SqlConnection it is on by default you must have not explicitly disabled the pool For most common cases using SqlConnection, this just means "will be pooled per unique connection-string" - the rest is automatic and just works.also; remember to use using statements around your connection usage, so you release things back to the pool even in exception - otherwise you'll exhaust it.

    • 0
  • Munesh Sharma
    Apr, 2014 12

    Assuming you mean database connections, the main points are:they must all use exactly the same connection string it is per-AppDomain for SSPI etc, the implicit user account must be common (i.e. the same domain user is being represented, or it will form multiple pools) it must be enabled and supported by the provider; in the case of SqlConnection it is on by default you must have not explicitly disabled the pool For most common cases using SqlConnection, this just means "will be pooled per unique connection-string" - the rest is automatic and just works.also; remember to use using statements around your connection usage, so you release things back to the pool even in exception - otherwise you'll exhaust it.

    • 0
  • Munesh Sharma
    Apr, 2014 12

    Assuming you mean database connections, the main points are:they must all use exactly the same connection string it is per-AppDomain for SSPI etc, the implicit user account must be common (i.e. the same domain user is being represented, or it will form multiple pools) it must be enabled and supported by the provider; in the case of SqlConnection it is on by default you must have not explicitly disabled the pool For most common cases using SqlConnection, this just means "will be pooled per unique connection-string" - the rest is automatic and just works.also; remember to use using statements around your connection usage, so you release things back to the pool even in exception - otherwise you'll exhaust it.

    • 0
  • ABHI GUPTA
    Oct, 2013 4

    Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings. The connection string must be identical.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS