INFO: MDAC 2.1 Sets Session Pooling ON by Default

ID: Q240166


The information in this article applies to:
  • Microsoft SQL Server version 7.0
  • Microsoft OLE DB Provider for SQL Server, version 7.01


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.


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.


REFERENCES

For more information, see the following:

Pooling in the Microsoft Data Access Components http://msdn.Microsoft.com/library/techart/pooling2.htm#pooling2_topic3

Additional query words:

Keywords : SSrvInst kbOLEDB kbSQLServ700 kbGrpMDAC kbGrpOLEDB
Version : WINDOWS:7.01; winnt:7.0
Platform : WINDOWS winnt
Issue type : kbinfo


Last Reviewed: October 13, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.