RE: Oledb connection pooling behavior



Hi Carlo,

Which provider are you using to access sql 2005? If you're using ODBC, then
you're referring to the ODBC Connection Pooling. If you're using native
provider, then you're referring to the OLEDB Session Pooling.

From ODBC Administrator, pooling can be enabled or disabled for specific
driver, but it's not sufficient: you will need to call SQLSetEnvAttr ODBC
API function to set the SQL_ATTR_CONNECTION_POOLING attribute. Please see
http://support.microsoft.com/kb/164221 for more information.

For OLEDB Session Pooling to work, you need a global connection open all
the time. See http://support.microsoft.com/kb/228843 for an example in VB
and ADO.

It also depends on your application environment, for example, pooling is
enabled by default from ASP or MTS and you don't need to maintain the
global connection.

Performance Monitor counters are only for ODBC Connections: to monitor the
ODBC Connection Pooling, you can use the performance object "OdBC
Connection Pooling".

All above information are from this KB:

#Support WebCast: ODBC Connection Pooling and OLEDB Session Pooling in
Microsoft Data Access Components
http://support.microsoft.com/kb/324686

Also, here's an interesting thread discussing this question:

#ODBC/OLE DB Connection Pool
http://groups.google.com/group/microsoft.public.data.oledb/browse_thread/thr
ead/dd9255abd5469ffc/

Hope this helps.


Sincerely,
Walter Wang (wawang@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

.