Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

INFO: MDAC 2.1 Sets Session Pooling ON by Default


View products that this article applies to.

This article was previously published under Q240166

↑ Back to the top


Summary

OLE DB resource pooling, also known as OLE DB session pooling, is handled by the OLE DB core components. To take advantage of resource pooling, an OLE DB consumer must invoke the data provider by using either the IDataInitialize or the IDBPromptInitialize interface. (ActiveX Data Objects [ADO] attempts to do this automatically). OLE DB resource pooling can be set ON for one provider and set OFF for another.

This article describes a behavioral change from MDAC 2.0 to MDAC 2.1. By default MDAC 2.0 sets session pooling OFF and MDAC 2.1 or later by default sets the session pooling ON.

↑ Back to the top


More information

By default, service components are enabled for all Microsoft OLE DB providers if the provider is invoked by either IDataInitialize or IDBPromptInitialize and if the provider is marked to work with pooling by using the OLEDB_Services registry key.

You can control pooling from your application in the following three ways:
  • You can disable pooling for an individual provider through the registry.
  • If you write directly to the OLE DB API, you can control pooling through the properties you set when connecting to the database.
  • You can control pooling from your connection string.
The Connection Pooling time-out (CPTIMEOUT) value is set to 60 seconds; this value cannot be configured in OLE DB resource pooling prior to the release of MDAC 2.5.

In MDAC 2.0 (including all service packs) the OLEDB_SERVICES registry key under the specific provider is set to 0xfffffffc, which means that no session pooling is available.

Starting with MDAC 2.1 (including all service packs) the OLEDB_SERVICES registry key is set to 0xffffffff, meaning session pooling is ON.

For example, SQLOLEDB is the native OLEDB provider for SQL Server. If you install MDAC 2.0 on your computer you will see that OLEDB_SERVICES under HKEY_CLASSES_ROOT\CLSID\{0C7FF16C-38E3-11d0-97AB-00C04FC2AD98} in the registry contains 0xfffffffc. On the other hand, if you have installed MDAC 2.1 or later the same entry contains 0xffffffff.

↑ Back to the top


References

For more information, see the following:

Pooling in the Microsoft Data Access Components http://msdn2.microsoft.com/en-us/library/ms810829.aspx

↑ Back to the top


Keywords: KB240166, kbinfo

↑ Back to the top

Article Info
Article ID : 240166
Revision : 7
Created on : 2/15/2007
Published on : 2/15/2007
Exists online : False
Views : 401