C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Pooling with the OLE DB .NET Data Provider
WhatsApp
Shashi Ray
12y
9.4
k
0
0
25
Blog
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
Up Next
ADO.NET Data Providers
Ebook Download
View all
Printing in C# Made Easy
Read by 22.5k people
Download Now!
Learn
View all
Membership not found