| The connection string representing an open and unique | | | | pooling. |
| link to a data source. Where a distributed system is | | | | If we take database connections continuously open |
| held, this involves a network connection. This | | | | can be troublesome, it can be help full for applications |
| connection Depends on the data source, the | | | | that are in constant communication with a database by |
| programming interface of the various connection | | | | negating the need to re-open connections. Some |
| objects may be different depends upon which they | | | | database administrators may frown on the practice |
| are build on. A connection object is specific to a | | | | since multiple connections to the database are open. |
| particular type of data source, such as it is different for | | | | Using connection pooling depends upon available |
| SQL Server and Oracle and Microsoft Access. | | | | server resources and application requirements (i.e., |
| Connection objects are not used interchangeably | | | | does it really need it). |
| across different data sources, but all the methods and | | | | Using connection pooling - Dot Net Interview Questions |
| properties grouped in the IDb Connection interface. | | | | Connection pooling is enabled by default. You may |
| In ADO NET, connection objects are implemented | | | | override the default behavior with the pooling setting in |
| within data providers as sealed classes. So a | | | | the connection string. The following SQL Server |
| connection class can never be modified or overridden, | | | | connection string does not utilize connection pooling: |
| it is just configured through properties and attributes. | | | | Data Source=TestServer;Initial Catalog=Northwind; |
| We can say that in Ado net all the connection classes | | | | User ID=Chester;Password=Tester;Pooling=False; |
| support connection pooling, although each class may | | | | • Max Pool Size: The maximum number of |
| implement in different manner. Connection pooling is | | | | connections allowed in the pool. The default value is |
| implicit, so no need to do manually because it provider | | | | 100. |
| manages this automatically. | | | | • Min Pool Size: The minimum number of |
| ADO NET pools connections with the same | | | | connections allowed in the pool. The default value is |
| connection or configuration. We can maintain more | | | | zero. |
| than one pool, one for each configuration. An | | | | • Enlist: Signals whether the Pooler |
| interesting note: Connection pooling is utilized by default | | | | automatically enlists the connection in the creation |
| otherwise specified. If we close and dispose of all | | | | thread's current transaction context. The default value |
| connections, then there will be no pool left in connection | | | | is true. |