Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Transactions without MSDTC

Posted on 2009-07-16
4
Medium Priority
?
819 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

715 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