Kbase 30667: Enabling ODBC Connection Pooling
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Solution ID: P667
GOAL:
How to enable ODBC connection pooling.
FACT(s) (Environment):
Windows 32 Intel
Windows NT 32 Intel/Windows 2000
FIX:
Connection pooling can be enabled or disabled from the following locations:
- The ODBC Data Source Administrator.
At the Data Source Administrator level, pooling can be enabled or disabled for the entire driver. This includes features such as whether pooling is on, the time-out value, and the wait retry setting. Unless a native ODBC application is being written, only with the Data Source Administrator should be of concern.
- The Registry.
Before the Data Source Administrator-offered support for connection pooling in ODBC 3.5 (MDAC 1.5), the Registry had to be used to configure ODBC connection pooling.
- The calling application.
From an application level (native ODBC application only), an application can make calls to the Data Source Administrator to tell it whether it wants pooling and the type of pooling desired.
The following two configurable settings within ODBC connection pooling can be set by editing the Registry directly, but with ODBC 3.5 (MDAC 1.5) and later the preferred method is to use the ODBC Data Source Administrator:
- The CPTimeout value.
This value indicates the amount of time that a connection remains unused in the pool before it is released.
(Connections are released to avoid "connection creep" that eventually leads to the server refusing any new connection requests when it hits its limit on available connections.)
- The Wait Retry value.
This value, expressed in seconds, is the length of time that the connection pool is blocked when it is determined that the server is not responding.
Connection pooling can be configured on a per-driver basis.
(For example, pooling can be enabled for one driver and off for another driver.) By setting the connection time-out value to 0 in the Registry for a specific driver, the pooling is disabled for that driver. Conversely, setting CPTimeout to a nonzero value turns on pooling for that driver.
For Internet Information Server (IIS) Version 3.0, pooling was set to off by default and you must manually turn on connection pooling.
For IIS Version 4.0 and later, pooling has been set to on by default. (IIS 3.0 used ODBC 3.0, and IIS 4.0 used ODBC 3.5.)