0X8004D010

Fix XACT_E_UNKNOWNRMGRID (0x8004D010) Fast

Database Errors Intermediate 👁 2 views 📅 Jun 8, 2026

The resource manager ID isn't recognized by the transaction manager. Usually a stale DTC registration or a busted MSDTC service.

The 30-Second Fix: Restart MSDTC and Recheck Your Connection

This error almost always happens when the MSDTC service loses its mind — crashed, hung, or someone stopped it mid-transaction. First thing: open Services.msc, find Distributed Transaction Coordinator, right-click and click Restart. If it's not running, start it manually. Set startup type to Automatic while you're at it.

Then bounce the application that hit the error — SQL Server Management Studio, your COM+ component, whatever. Try the transaction again. If it works, you're done. 80% of the time this is all you need.

But if the error comes back, the MSDTC service has stale registration data for your resource manager. That's the real culprit.

The 5-Minute Fix: Clear Stale Resource Manager Registrations

The resource manager ID (that GUID in the error) gets cached in the Windows registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\XACT_MAP. When a transaction crashes or the RM disconnects uncleanly, the old entry lingers and blocks new ones. You need to nuke it.

  1. Open Regedit as admin.
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\XACT_MAP.
  3. Look for a key named with the GUID that matches the error. It'll be under a subkey like XACT_MAP — sometimes it's empty, sometimes there's a GUID directly.
  4. Delete the entire XACT_MAP key. Don't worry, MSDTC regenerates it on restart.
  5. Restart MSDTC again.

If you can't find the key or it's already empty, move to the next step.

The 15+ Minute Fix: Regenerate the MSDTC Log

When the above doesn't work, the DTC transaction log is corrupted. That's the file C:\Windows\System32\MSDTC\MSDTC.LOG. You'll need to nuke it and let MSDTC rebuild it. This nukes all in-flight transactions — so if you have active distributed transactions, finish them first.

net stop msdtc
msdtc -uninstall
msdtc -install
net start msdtc

Run those commands in an elevated command prompt. The msdtc -uninstall removes the service and logs. msdtc -install re-creates them fresh. After that, restart MSDTC and test.

If you're on a clustered environment (SQL Server Always On or Windows Failover Cluster), you can't run uninstall like that. Instead:

  1. Open Failover Cluster Manager.
  2. Find the DTC role (usually named like Distributed Transaction Coordinator).
  3. Take it offline temporarily.
  4. On each cluster node, delete C:\Windows\System32\MSDTC\MSDTC.LOG.
  5. Bring the DTC role back online.

What Typically Triggers This Error

I've seen this most often after a SQL Server failover where the old DTC coordinator was on Node A, the transaction was mid-air, and Node B tries to pick it up but doesn't have the RM ID registered. Also happens after a Windows Update that restarts MSDTC silently, or when someone kills a hung SQL process that was in a distributed transaction.

Another common scenario: running a linked server query between two SQL instances with distributed transactions enabled, and the remote server's DTC service is stopped or misconfigured. Check that first if the error only happens with cross-server queries.

Why This Fix Works

The resource manager ID is essentially a session token between your app and the DTC coordinator. When it goes stale — due to a crash, restart, or orphaned transaction — DTC refuses to reuse it. Clearing the registration or regenerating the log forces DTC to forget the bad state and start fresh. Simple and brutal, but reliable.

Pro tip: If you see this error repeatedly, check your firewall settings for port 135 (RPC) and the dynamic MSDTC ports (default 5000-5100). DTC can fail to register a new RM if it can't negotiate a connection. But that's another article.

Was this solution helpful?