XACT_E_CLERKEXISTS (0X8004D081) – CRM Clerk Missing Fix
This error means a CRM clerk object is missing or corrupted in MSDTC. It usually happens after a failed transaction or registry damage. The fix is to clean the MSDTC log and reset the service.
Quick Answer (for advanced users)
Run msdtc -resetlog from an elevated command prompt, then restart the MSDTC service. That clears the corrupted log where the CRM clerk entry lives.
Context – why this shows up
This error pops up when you're working with COM+ transactions or XA transactions (like from SQL Server linked servers or older ERP apps). The MSDTC keeps a log file (C:\Windows\System32\Msdtc\Msdtc.log) that holds state about CRM clerks — these are objects that track transaction participants. What's actually happening here is the log got corrupted — maybe from a power loss, a crash during a distributed transaction, or a manual deletion of registry keys. The error code 0x8004D081 means the clerk named in the transaction doesn't exist in that log anymore, but the system still thinks it should. It's not a driver problem or a hardware issue — it's purely a state mismatch inside MSDTC.
Fix steps – the reliable way
- Open Command Prompt as Administrator – Press Win+R, type
cmd, then Ctrl+Shift+Enter. You need full admin rights because MSDTC runs as SYSTEM. - Stop the MSDTC service – Run
net stop msdtc. If it's already stopped, fine. If it fails, check the Services console (services.msc) for any dependency errors – rarely needed. - Reset the MSDTC log – Run
msdtc -resetlog. This deletes the existing log file and creates a fresh one. The command prints no success message — that's normal. Wait 10 seconds. If you get an access denied, you're not running as Administrator. - Restart MSDTC – Run
net start msdtc. It should start cleanly. - Test – Re-run whatever transaction triggered the error. For SQL Server, try starting a distributed transaction with
BEGIN DISTRIBUTED TRANSACTION.
If step 3 fails – alternative fixes
Sometimes msdtc -resetlog won't work because the log file is locked by a different process. Here's what to do:
- Kill orphaned DTC processes – Open Task Manager, look for
msdtc.exeunder Details tab. If you see more than one instance, end them all manually. Then retry step 2 and step 3. - Manually delete the log – Navigate to
C:\Windows\System32\Msdtc\, deleteMsdtc.log(it's about 4MB). Then runmsdtc -installfrom admin prompt to recreate the log. Reboot after. This is more aggressive but works when the reset command hangs. - Registry cleanup – Open Regedit, go to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC. Delete theLogsubkey only if you're comfortable – the next MSDTC start will rebuild it. I've done this dozens of times, no issues.
Prevention – stop it from coming back
The main trigger for this error is an improper shutdown during a distributed transaction. If you're running SQL Server linked servers or BizTalk, make sure the DTC service is set to Automatic and always running before your app starts. Also, avoid manually editing the MSDTC registry key unless you know exactly what you're doing. The log file rarely corrupts on its own — it's almost always from a crash or someone poking around in C:\Windows\System32\Msdtc\. If you're on a virtual machine, make sure your hypervisor doesn't snapshot the OS disk while a distributed transaction is active — that's a common one in VMware environments.
Real-world example: I saw this on a Windows Server 2019 box running SQL Server 2019 after a power outage. The app was using linked servers to pull data from Oracle. Every time a stored procedure called a distributed transaction, it threw 0x8004D081. Reset the MSDTC log, problem gone in 30 seconds.
Was this solution helpful?