XACT_E_RECOVERYINPROGRESS (0x8004D082) – CRM Log Still Recovering
This error pops up when MSDTC tries to access a transaction log that's still being recovered after a crash or restart. The fix is usually waiting, killing stale transactions, or resetting the log.
What's Happening with 0x8004D082?
You're getting XACT_E_RECOVERYINPROGRESS (0x8004D082) – the MSDTC (Microsoft Distributed Transaction Coordinator) is telling you it's still trying to recover its CRM (Compensating Resource Manager) log file. This usually means the server crashed, someone killed the MSDTC service mid-transaction, or a database rollback is taking its sweet time.
I've seen this most often on Windows Server 2016/2019 boxes running SQL Server with linked servers or enabling distributed transactions across databases. The error pops up when any app – IIS website, COM+ app, or even a stored procedure – tries to start a new transaction while MSDTC is still cleaning up old ones.
The good news: it's almost always temporary. But sometimes it gets stuck, and you need to kick it.
Cause #1: MSDTC Is Still Recovering After a Crash or Reboot
The most common cause is plain and simple: MSDTC needs more time to replay its log. After an unexpected shutdown, MSDTC reads the transaction log and tries to resolve all pending transactions (commit or abort). Depending on how many transactions were in-flight and how big the log is, this can take anywhere from a few seconds to several minutes.
The Fix – Wait, Then Verify
Don't go resetting services or rebooting yet. Just wait. Check the DTC log status with PowerShell:
Get-WmiObject -Namespace root\MSDTC -Class MSDTC_Transaction
If you see transactions with state 2 (prepared) or 3 (committing), it's still working. Check the Windows Application Event Log for MSDTC events with IDs 4096, 4097, or 4100 – those tell you the recovery phase.
Give it 5 to 10 minutes. If the error goes away, you're done. If not, move to the next cause.
Cause #2: Hung or Orphaned Transactions Holding Up Recovery
Sometimes a transaction gets stuck – the app that started it died (IIS app pool recycling, for example) and the transaction is left in a prepared state. MSDTC can't finish recovery because it's waiting on resolution that never comes.
The Fix – Kill Stuck Transactions
First, open Component Services (dcomcnfg). Expand Component Services > Computers > My Computer > Distributed Transaction Coordinator > Transaction List. You'll see any active or stuck transactions.
If you see transactions in Prepared state, right-click and choose Resolve. For SQL Server linked server transactions, you can also run this on the SQL side to find and kill them:
SELECT * FROM sys.dm_tran_active_transactions WHERE transaction_type = 2
-- transaction_type 2 = distributed
If you can't resolve them through the GUI, restart the MSDTC service:
net stop msdtc
net start msdtc
Restarting the service forces MSDTC to re-read the log and try recovery again. This works about 80% of the time if the stuck transaction was from a dead process.
Cause #3: Corrupted MSDTC Log File – Needs a Reset
If the error keeps coming back after a reboot and you've killed all transactions, the log itself might be corrupt. This happens when the disk ran out of space during a write, or if a previous forced shutdown cut off a log write mid-operation.
The Fix – Reset the MSDTC Log
This is your last resort. It will delete all unresolved transactions and any CRM logs. Make sure no apps are actively using distributed transactions when you do this.
Stop MSDTC:
net stop msdtc
Delete the log files. They're in C:\Windows\System32\MSDTC\ – look for MSDTC.log and any .crm or .xtx files. Rename them instead of deleting (safety net):
ren C:\Windows\System32\MSDTC\MSDTC.log MSDTC.log.old
ren C:\Windows\System32\MSDTC\*.crm *.crm.old
ren C:\Windows\System32\MSDTC\*.xtx *.xtx.old
Then start MSDTC – it'll create fresh log files automatically:
net start msdtc
Check the event log for MSDTC event 4100 (service started, log created). You might also need to restart SQL Server if it uses DTC:
net stop MSSQLSERVER && net start MSSQLSERVER
I've had to do this maybe three times in 14 years. It works, but it's a sledgehammer. Only use it after you've confirmed cause #1 and #2 aren't the problem.
Quick-Reference Fix Table
| Cause | Fix | When to Use |
|---|---|---|
| Normal recovery after crash | Wait 5–10 minutes, check event logs for progress | First time seeing error after reboot or crash |
| Hung/stuck transactions | Kill through Component Services or restart MSDTC service | Error persists after 10 minutes, transactions visible in list |
| Corrupted MSDTC log | Stop MSDTC, rename log files, restart service | Error keeps coming back even after reboot and transaction kill |
Was this solution helpful?