Solved

Transactions without MSDTC

Posted on 2009-07-16
4
803 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
  • 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
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 tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
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…

770 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