ODBC/MX Driver for Windows Manual (SQL/MX 2.x)
ODBC/MX Client Overview
HP NonStop ODBC/MX Driver for Windows—527888-004
1-4
Connection Pooling
the user context to the one defined in the configuration for the data source name on
the server.
Connection Pooling
Connection pooling can improve MXCS performance by allowing an ODBC application
to use (or reuse) a connection from a pool of connections without reestablishing the
connection.
The Microsoft ODBC driver manager maintains the connection pool by continuing to
hold a connection for a specified time after the client disconnects. During that time, if
the client sends another connection request that uses the same connection string, the
driver manager uses the same connection without sending another connection request
to the server. This can improve the connection response time and is especially useful
for web-based applications where connections to the same data source name occur
frequently.
Enabling Connection Pooling
The connection pooling mechanism is enabled by the client ODBC application. The
ODBC/MX client installation program (tdm_odbc.exe) automatically enables connection
pooling for the ODBC/MX driver by setting the CPTimeout value to 60 seconds in the
following Windows NT Registry entry:
HKEY_LOCAL_SYSTEM\Software\ODBC\ODBCINST.INI\
NonStop ODBC/MX\CPTimeout
To change CPTimeout to a different value for all ODBC/MX clients on the client
workstation, edit the CPTimeout Registry entry using the Registry Editor. To change
CPTimeout for only one session, call the SQLConfigDriver function.
If CPTimeout is zero (0), connection pooling is disabled for the ODBC/MX driver, even
if an application requests it.
Note. For an application to use connection pooling, the Connection Idle Timeout value for the
server data source to which the application will connect must be greater than the CPTimeout
value. The default is 10 minutes.
You set the Connection Idle Timeout value when you configure the data source using
NSM/web.