Export (0) Print
Expand All

Connection Pooling (Microsoft Drivers for PHP for SQL Server)

SQL Server 2008 R2

The following are important points to note about connection pooling in the Microsoft Drivers for PHP for SQL Server:

  • The Microsoft Drivers for PHP for SQL Server uses ODBC connection pooling.

  • By default, connection pooling is enabled. When you connect to a server, the driver attempts to use a pooled connection before it creates a new one. If an equivalent connection is not found in the pool, a new connection is created and added to the pool. The driver determines whether connections are equivalent based on a comparison of connection strings.

  • When a connection from the pool is used, the connection state is reset.

  • Closing the connection returns the connection to the pool.

For more information about connection pooling, see Driver Manager Connection Pooling.

You can force the driver to create a new connection (instead of looking for an equivalent connection in the connection pool) by setting the value of the ConnectionPooling attribute in the connection string to false (or 0).

If the ConnectionPooling attribute is omitted from the connection string or if it is set to true (or 1), the driver will only create a new connection if an equivalent connection does not exist in the connection pool.

For information about other connection attributes, see Connection Options.

Community Additions

ADD
Show:
© 2014 Microsoft