msdtc

SQL Server and TransactionScope (with MSDTC): Sporadically can't get connection

I've written some tests for .net code that invokes calls to my SQL Server. It appears that using System.Transactions is an excellent choice for rolling back any modifications to the database that result. I'm aware that some purists would suggest that I might want to mock the database, but I'm not going down that road; this is not stric...

Why is MSDTC not supported when using SQL Server Mirroring & Automatic Failover?

I have an application that I would like to have support SQL Server Mirroring. However, the architecture is currently such that multiple WCF services and DB connections will be enlisted in a single MSDTC transactions, and Microsoft states that MSDTC is not supported when using Mirroring. Their explanation is not terribly informative: ...

No MSDTC - Still getting "communication with underlying transaction manager failed"

Hi In my project I am using Ado.Net's DbTransaction object to manage transaction... Then why I am getting MSDTC related error - "communication with underlying transaction manager failed". Here is my code. DbTransaction trans = Connection.BeginTransaction(); //Code if (successfull) { trans.Commit(); } else { trans.RollBack();...

Are Distributed Transactions a good idea for enabling rollback of database upgrades in Windows Installer Custom Actions?

I've outgrown the Sql Server custom actions available in WiX, so I'm taking the bold step of creating my own using Deployment Tools Foundation. I want to be a good citizen and make sure that mine support rollback. But what's the best way of doing it? I need to support SQL Server 2005 and later, all editions. The problem, as I see it, i...

Do I need MSDTC for NServiceBus / NHibernate?

Hi Guys, I am writing an NServiceBus solution and trying to use DBSubcriptionStorage. This uses NHibernate for data access and I get the following exception: The partner transaction manager has disabled its support for remote/network transactions I could enable MSDTC but my question is: where is this requirement coming from and ca...

WF4: Persistance and DTC

Hi ! I'm building a workflow host that will manage WorkflowApplication instances. Instances will use SqlWorkflowInstanceStore. Tables and logic for SqlWorkflowInstanceStore are in the same database as my other tables and logic that I'm writing into with persistence participants. I'm not using AppFabric. My question is: do I need DTC...

Simple Transactions

I have 2 linq 2 SQL statements I'd like to be in a transaction (the SQL server is remote, outside firewalls etc) all other communication works but when I wrap these 2 statements in a TransactionScope() I begin having to configure MSDTC which we did, but then there are firewall issues (I think) is there a simpler way? the basics of what ...

Suppressing TransactionScope enlistment of a readonly EF context?

I have a scenario where I need to open multiple datacontexts which point to different databases. I am only writing to one of the databases though and reading from the others ... so technically the transaction should only be against one of the databases. I'd like to avoid having the TransactionScope upgrade into a distributed transaction...

WCF Custom Message Writing With Transaction Support

Hi All I'm using a custom message that inherits the System.Servicemodel.Channels.Message. My custom message get IEnumerable collection which pulled from a database. The WCF service is transactional (which is already tested). MS-DTC is enabled. Problem is, that when the protected override void OnWriteBodyContents(XmlDictionaryWriter...

Handle NService bus messages without DTC

We are not using DTC in our message handlers. We turned off. NService bus endpoint transaction set to false. But in the distributor getting the following exception if DTC is disabled. May I know how to handle messages without DTC. 2010-08-27 14:28:34,953 [Worker.7] ERROR NServiceBus.Unicast.Transport.Msmq.MsmqTransport [(null)] - Error ...

Using TransactionScope with MSDTC service stopped for a local database

After some discussions with LLBL we have decided that we will end up using MSDTC and Distributed Transactions in order to be able to use implicit Transactions and TransactionScope. See here for details about that decision. Now we did some testing on what needs to be done for the service to be installed correctly.It seems that when th...

SqlConnection and TransactionScope Timeout

I have a TransactionScope (over DTC, read committed) with a timeout of 60 minutes. In the TransactionScope I have opened the connection (I hope to enlist in the transaction) but after 30 seconds I get a timeout. In the machine.config I changed the system.transaction maxTimeout to 60 minutes. Why does the timeout occur after 30 seconds?...

transaction problem with entity framework 4

I'm trying to implement a transaction with entity framework 4. From what I've read, the code below is correct. The SaveChanges works fine but as soon as I hit the first ExecuteFunction call I get the following exception: The underlying provider failed on Open. ---> System.Transactions.TransactionManagerCommunicationException: ...

How to debug DTC issues?

I have a unit test for some code that occasionally throws a "The transaction has already been implicitly or explicitly committed or aborted." exception. Google gives me lots of wonderful hits but none that I've read seem to apply. If I run the unit test locally the exception is never thrown. If I run it on the build server manually the...

NServiceBus - I want AsA_Server config, but not participate in MSDTC transaction

I have a service in which I don't want to messages to purged from its input queue when the service starts up and I don't want it to participate in an MSDTC transaction. I'm configuring it's endpoint to run AsA_Server, but I can't see any way to disable starting an MSDTC transaction. I'm using the NServiceBus.Host.exe. Has anyone done ...

MSMQ messages bound for clustered MSMQ instance get stuck in outgoing queues

We have clustered MSMQ for a set of NServiceBus services, and everything runs great until it doesn't. Outgoing queues on one server start filling up, and pretty soon the whole system is hung. More details: We have a clustered MSMQ between servers N1 and N2. Other clustered resources are only services that operate directly on the clus...