TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Pooling with the OLE DB .NET Data Provider
Shashi Ray
May 23, 2012
9.3
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
Pooling with the OLE DB .NET Data Provider,Managing Connection Pooling with Pooled Objects.
Pooling with the OLE DB .NET Data Provider
The OLE DB .NET Data Provider pools connections by using the underlying services of OLE DB resource pooling. You have a number of options for configuring resource pooling:
You can use the connection string to configure, enable, or disable resource pooling.
You can use the registry.
You can programmatically configure resource pooling.
To circumvent registry-related deployment issues, avoid using the registry to configure OLE DB resource pooling.
Managing Connection Pooling with Pooled Objects
As Windows DNA developers, you were encouraged to disable OLE DB resource pooling and/or ODBC connection pooling and use COM+ object pooling as a technique to pool database connections. There are two primary reasons for this:
Pool sizes and thresholds can be explicitly configured (in the COM+ catalog).
Performance is improved. The pooled object approach can outperform native pooling by a factor of two.
However, because the SQL Server .NET Data Provider uses pooling internally, you no longer need to develop your own object pooling mechanism (when using this provider). You can thus avoid the complexities associated with manual transaction enlistment.
You might want to consider COM+ object pooling if you are using the OLE DB .NET Data Provider to benefit from superior configuration and improved performance. If you develop a pooled object for this purpose, you must disable OLE DB resource pooling and automatic transaction enlistment (for example, by including "OLE DB Services=-4" in the connection string). You must handle transaction enlistment within your pooled object implementation.
Pooling with the OLE DB .NET Data Provider
Next Recommended Reading
ADO.NET Data Providers