Exception using MSDTC Transactions on SQL 2008 / Server 2008 R2 x64 HRESULT: 0x8004D025
Asked Answered
G

1

6

I'm currently upgrading an app to SQL 2008 / Server 2008 R2 x64 and I'm seeing some strange behaviour that I have not seen on SQL 2005 / Server 2003. Randomly I get an exception from MSDTC: The partner transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D025). Please note that I HAVE enabled network transactions without authentication and these transactions do work say 95% of the time. But then some fail with this message. It's a SQLBulkCopy object if that's relevant.

I've investigated the DTC statistics and interestingly when the transaction throws this exception there is no aborted transaction, but it does record one completed transaction. Whats REALLY interesting is that the remote transaction manager ALSO creates a new transaction (status committed). There is a second write as part of the transaction which is successfully written to the database, but the first one is not.

In terms of sequencing, when I see this error the following has occurred:

  1. Delete from table (this works)
  2. Bulkcopy in new rows (this fails and the exception is raised on the "WriteToServer" method)
  3. Create record of the write occuring (this works).

I know that the SQL and the application have both got their MSDTC's configured for remote transactions as several of the transactions do work successfully. Any idea why this is happening and how I could fix it?

Gunn answered 4/4, 2011 at 4:25 Comment(0)
W
8

Haven't personally seen this one in practice, but found this:

From here:

  1. Make sure you check "Network DTC Access", "Allow Remote Client", "Allow Inbound/Outbound", "Enable TIP" (Some option may not be necessary, have a try to get your configuration)
  2. The service will restart
  3. BUT YOU MAY NEED TO REBOOT YOUR SERVER IF IT STILL DOESN'T WORK
Woollen answered 4/4, 2011 at 4:33 Comment(1)
What a surprise. Reboot both servers and I cannot reproduce after 100 transactions... Thanks for slapping me round the head with what I should have done in the first place. Oh well at least there is a SO question with the HRESULT in it for the next person.Gunn

© 2022 - 2024 — McMap. All rights reserved.