.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
ASPEvil
Ashutosh Jha
Jean Paul
satyapriyanayak
SP

Home >> Articles >> DataBase >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Pooling with the OLE DB .NET Data Provider

Posted By:Shashi Ray       Posted Date: November 24, 2009    Points: 25    Category: DataBase    URL:   
 

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.

 

 

Shashi Ray

 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend