Connection Pooling Confusion for ODBC/SQL92 Clients (CPTimeo

Posted by dbeavon on 28-May-2019 20:19

Is there any supported way of manipulating the connection pool timeout from an ODBC client?  I thought there was a connection string option (CPTimeout).  But it doesn't seem to be having any effect for some reason.

For example, I'm trying to set my connection pooling in the connection string with CPTimeout like so:

DRIVER=Progress OpenEdge 11.7 Driver;DB=mydata;PORT=5005;HOST=myhost;DefaultIsolationLevel=READ UNCOMMITTED;CPTimeout=5

...But as I said, that seems to have no effect.

I haven't found any explicit documentation that says this is a valid argument in a connection string.  But I found a reference to "CPTimeout" here:

https://knowledgebase.progress.com/articles/Article/000043748

I am able to configure the timeout for the entire client machine using ODBC admin like so: (image)

This is working as I expect and it impacts all odbc connections using that driver. But I would much rather do it in a connection string since it is easier to deploy and configure.

Any help would be greatly appreciated.

Thanks, David

Posted by dbeavon on 29-May-2019 13:17

I have not found any way to manipulate the connection pooling behavior from a connection string.  For the purpose of ADO.Net's OdbcConnection, it looks like Progress only supports the driver-based connection pooling thru ODBC driver manager.

See... https://knowledgebase.progress.com/articles/Article/000038726

No, the Progress OpenEdge ODBC driver for Windows does not support DataDirect Connection Pooling; only the Microsoft Connection Pooling option is available.

The Microsoft Connection Pooling is available in 2 flavours: driver level or application level.

Driver level is enabled by default. For Application level, an ODBC application can call SQLSetEnvAttr with the SQL_ATTR_CONNECTION_POOLING attribute to enable connection pooling.

This KB says a similar thing: https://knowledgebase.progress.com/articles/Article/000043748

For the Progress OpenEdge ODBC drivers on Windows, Connection Pooling is provided via Microsoft's own facility in the ODBC Data Source Administrator.

In summary, the only way to manipulate the connection pooling of ODBC connections to Progress seems to be in the ODBC driver manager.  It would be nice if Progress had a managed .Net provider but otherwise I will have to become more familiar with OdbcConnection in ADO.Net.

Given that pooling is managed by the ODBC driver manager, there is probably no good way to customize it from one application to another (when those applications are running on the same client machine).  The only thing I found in ADO.Net is a method that clears out the underlying ODBC environment: OdbcConnection.ReleaseObjectPool https://docs.microsoft.com/en-us/dotnet/api/system.data.odbc.odbcconnection.releaseobjectpool?view=netframework-4.8 

Presumably that would give us an explicit way to close all connections in the application's connection pool.  But once again this is not built into the Progress ODBC driver/provider.  It is a feature that is implemented within the ODBC Driver Manager of the Windows client machine.

All Replies

Posted by dbeavon on 29-May-2019 13:17

I have not found any way to manipulate the connection pooling behavior from a connection string.  For the purpose of ADO.Net's OdbcConnection, it looks like Progress only supports the driver-based connection pooling thru ODBC driver manager.

See... https://knowledgebase.progress.com/articles/Article/000038726

No, the Progress OpenEdge ODBC driver for Windows does not support DataDirect Connection Pooling; only the Microsoft Connection Pooling option is available.

The Microsoft Connection Pooling is available in 2 flavours: driver level or application level.

Driver level is enabled by default. For Application level, an ODBC application can call SQLSetEnvAttr with the SQL_ATTR_CONNECTION_POOLING attribute to enable connection pooling.

This KB says a similar thing: https://knowledgebase.progress.com/articles/Article/000043748

For the Progress OpenEdge ODBC drivers on Windows, Connection Pooling is provided via Microsoft's own facility in the ODBC Data Source Administrator.

In summary, the only way to manipulate the connection pooling of ODBC connections to Progress seems to be in the ODBC driver manager.  It would be nice if Progress had a managed .Net provider but otherwise I will have to become more familiar with OdbcConnection in ADO.Net.

Given that pooling is managed by the ODBC driver manager, there is probably no good way to customize it from one application to another (when those applications are running on the same client machine).  The only thing I found in ADO.Net is a method that clears out the underlying ODBC environment: OdbcConnection.ReleaseObjectPool https://docs.microsoft.com/en-us/dotnet/api/system.data.odbc.odbcconnection.releaseobjectpool?view=netframework-4.8 

Presumably that would give us an explicit way to close all connections in the application's connection pool.  But once again this is not built into the Progress ODBC driver/provider.  It is a feature that is implemented within the ODBC Driver Manager of the Windows client machine.

This thread is closed