0X00000202

STATUS_RESOURCEMANAGER_READ_ONLY 0X00000202 Fix

This error hits when a resource manager reports it's stuck read-only during a transaction. Happens during distributed transactions or when using SQL Server linked servers with stale state.

You're running a distributed transaction—maybe an INSERT across linked SQL Servers, or calling a stored procedure that spans two databases with MSDTC enabled—and boom, you get 0X00000202 with the message "The specified ResourceManager made no changes or updates to the resource under this transaction." It usually happens mid-transaction, after the first commit attempt fails. The transaction then rolls back, but the resource manager won't accept new writes because it's flagged itself as read-only.

What's actually happening here

The error code 0X00000202 maps to STATUS_RESOURCEMANAGER_READ_ONLY. This is a kernel-level status from the Resource Manager (RM) inside the Kernel Transaction Manager (KTM) on Windows. What's going on: the RM has entered a read-only state because it detected a recovery failure or exhausted its log space. The RM then refuses all write operations—even though the transaction coordinator (like MSDTC) thinks it should still accept them.

The trigger is almost always an aborted transaction that left the RM in an inconsistent state. For example, if you kill a query mid-commit, or a power loss happens during a distributed transaction, the RM saves a checkpoint that says "I'm read-only until I recover fully." But sometimes that recovery never finishes—especially if the log file is corrupt or full.

The root cause

Three common reasons:

  1. Log file corruption in the resource manager's transaction log. Happens often with SQL Server when the transaction log for a database gets truncated incorrectly or runs out of space during a long-running transaction.
  2. MSDTC recovery failure. The Distributed Transaction Coordinator tries to recover after a crash, but one of the enlisted resource managers can't replay its log. That RM then stays read-only.
  3. Manual intervention gone wrong. Someone ran KILL on a process involved in a distributed transaction, or forced a failover without draining transactions first.

How to fix it

Skip the generic advice about restarting services—it rarely works for this specific error because the RM persists its read-only state across restarts. Here's the sequence that actually clears it.

  1. Identify which resource manager is stuck.
    Open Event Viewer on the server where the error appears. Look under Windows Logs > Application for events with source "KtmRm" or "Microsoft-Windows-Kernel-TransactionManager". Event ID 1 or 4 usually says "Resource Manager failed to recover" along with a GUID. Note that GUID—it's the RM identifier.
  2. Force the RM to abandon its read-only stance.
    Open an elevated Command Prompt (Run as Administrator). Run:
    fsutil resource setrecovery C:
    Replace C: with the drive containing the transaction log. This forces the kernel to reinitialize all resource managers on that volume. It may cause a brief pause in I/O.
  3. Clear the stale RM state.
    If step 2 doesn't work, you need to de-register the RM. Use the tmadmin tool (part of Windows SDK) or PowerShell. I use this PowerShell snippet:
    $rmGuid = "your-guid-here"
    Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\KtmRm\Parameters\ResourceManagers\$rmGuid" -Force
    Then restart the KtmRm service:
    net stop ktmrm
    net start ktmrm
    Warning: This kills any pending transactions for that RM. Only do this if you're sure no distributed transactions are still active.
  4. Check MSDTC logs.
    If the error came from a distributed transaction, run msdtc -resetlog in an elevated prompt. Then restart MSDTC:
    net stop msdtc
    net start msdtc
    This clears the MSDTC transaction log, which sometimes prevents it from re-enlisting the broken RM.
  5. Fix SQL Server transaction log if that's your RM.
    For SQL Server, the error often points to a specific database. Check its log file size and free space:
    DBCC SQLPERF(LOGSPACE);
    If the log is full, do a log backup or shrink it:
    BACKUP LOG YourDatabase TO DISK = 'NUL';
    DBCC SHRINKFILE (YourLogFile, 100);
    Then run ALTER DATABASE YourDatabase SET RECOVERY SIMPLE; temporarily to force a log checkpoint, then switch back to FULL.

If it still fails

Sometimes the RM state is baked into a system file and won't clear. Next step: reboot the server. Yes, it's cliche, but for this specific error, a full reboot flushes the KTM state completely. If that still doesn't work, you're looking at a corrupted transaction log on the volume. Run chkdsk /f C: on the affected drive to repair file system errors. On rare occasions, the drive's NTFS Master File Table gets fragmented and the RM can't write its recovery data—chkdsk fixes that.

One last thing: check if you're running Windows Server 2012 R2 or earlier. There's a known bug in older Windows versions where the KtmRm service leaks memory and enters read-only mode after ~5000 transactions. Update to Server 2016+ or apply the hotfix from KB 4012213.

Related Errors in Database Errors
0X80040150 Fix REGDB_E_READREGDB 0X80040150: Registry Read Failure 0XC0190040 Fix STATUS_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE (0XC0190040) 0XC019004C Fix STATUS_CANNOT_ACCEPT_TRANSACTED_WORK (0XC019004C) Error MySQL Slow Query Log Filling Disk – Real Fix

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.