Solved

Transactions without MSDTC

Posted on 2009-07-16
4
810 Views
Last Modified: 2013-12-17
I am looking for a solutions to the following problem:

I need to be able to handle transactions across multiple sql servers without invoking MSDTC.  I know there has to be a way to do this by enlisting in a transaction that i implement myself, i'm just not finding any information on how to do it without using MSDTC.  

I know that the "autoEnlist=false" will keep the transactionscope object from starting DTC, but i can't find examples managing transactions without msdtc.

Please help!!
0
Comment
Question by:kmitch62
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 41

Expert Comment

by:graye
ID: 24880918
That's a bit odd... since Microsoft wrote the Distrubuted Transaction Coordinator service specifically for this scenario
What's your beef with MSDTC?
0
 

Author Comment

by:kmitch62
ID: 24880954
Personally, I don't have any beef with it.  The organization i'm working for feels that there are performance issues that they can't have in their OLTP application.

I'm aware that MSDTC is basically the standard, but I have to live within my constraints.
0
 
LVL 41

Expert Comment

by:graye
ID: 24882220
Ok... I'm assuming we are talking about a database transaction?  If so tell more about the databases (SQL Server 2008?)
0
 

Accepted Solution

by:
kmitch62 earned 0 total points
ID: 24929488
I've worked out the answer.

1. use the transactionscope object with the "autoenlist=false" in the connectionstrings of the connections.  if you don't use autoenlist=false, transactionscope automatically tries to enlist in MSDTC.
2. create an object that inherits DbTranaction and IEnlistmentNotification
3. When the connection is instanciated, you have to manually create the object in #2 and then enlist in the abient transaction with Transaction.Current and Transaction.EnlistVolitile method
4. write the object in #2 to override the iEnlistmentNotification methods.
5.when all transaction functionality is completed, call TransactionScope.Complete.  This will commit all the contained transactions.  If an error is thrown by any of the transaction functionaltiy, the transactionscope will rollback all contained transactions.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question