0X000020CC

Fix ERROR_DS_RECALCSCHEMA_FAILED 0x20CC in Active Directory

Schema update fails when AD can't recalc the validation cache. Force a schema refresh and check FSMO roles. Reboot the DC if needed.

Yeah, that 0x20CC error is a pain. You're trying to extend the schema or modify an attribute, and Windows just won't let you. Let's cut to the chase.

The direct fix: force a schema cache refresh

What's happening here is the domain controller you're working on has a stale in-memory schema cache. The schema update engine recalculates a validation cache before writing, and when it can't, it spits out ERROR_DS_RECALCSCHEMA_FAILED. The fastest way out is to make the DC throw away its cached copy and reload from the actual schema partition.

  1. Log on to the DC that holds the schema master FSMO role. You can check with netdom query fsmo or dsquery server -hasfsmo schema.
  2. Open an elevated command prompt.
  3. Run this command to stop the AD DS service. On Windows Server 2016 and later, it's net stop ntds. In older versions, it's net stop ntds /y (the /y forces dependent services to stop).
  4. Now start it again: net start ntds.
  5. Right after the service restarts, the schema cache rebuilds automatically. Try your schema update again.

If that doesn't do it, you might be dealing with a domain controller that's not the schema master but still trying to apply the change. In that case, you don't need a full service restart. Instead, use ADSI Edit to force the cache refresh:

1. Open ADSI Edit (adsiedit.msc).
2. Connect to the "Schema" naming context on the DC you're using.
3. Right-click "CN=Schema,CN=Configuration,DC=..." and choose "Properties".
4. Find the attribute "schemaUpdateNow". Set it to "1" and click OK.
5. Wait a minute, then try your import again.

That schemaUpdateNow attribute forces the DC to re-read the schema from the directory, which is exactly what the error says it failed to do.

Why this actually works

Here's the underlying mechanism. When you modify the schema, the directory service builds a validation cache to check attribute integrity, like ensuring a linked attribute's backlink exists. That cache is computed based on the schema objects currently in memory. If the DC's cache is out of sync with the database—maybe because of a replication hiccup or a partially applied earlier change—the recalculation fails and you get 0x20CC.

Restarting the AD DS service clears that in-memory cache completely. On startup, the DC loads the schema from the directory database, computes a fresh validation cache, and now your update has a consistent baseline to work from. It's like clearing a corrupted cache in a browser—same idea, higher stakes.

The schemaUpdateNow trick works because it tells the DC to synchronously process any pending schema updates and refresh its internal cache. It's less disruptive than a service restart, but you need to be on the schema master for it to have full effect.

Less common variations of the same issue

1. FSMO role mismatch

You can hit 0x20CC when the DC you're working on isn't the schema master, and the actual schema master is unreachable or hasn't replicated recently. The error might appear even though the change should be allowed. Fix: transfer the schema master role to a DC that's responsive, then retry.

move-ADDirectoryServerOperationMasterRole -Identity 'DC-Schema01' -OperationMasterRole SchemaMaster

Or use the GUI: Active Directory Schema snap-in, right-click, "Operations Masters", and change the role.

2. Replication lag between DCs

If you're applying schema changes to a non-schema-master DC (which you shouldn't normally do, but it happens with scripting), the local cache can be stale. The error shows up because the local DC tries to recalc the cache based on the schema it has, which is behind. Force replication with repadmin /syncall /AdeP on the schema master, then wait a few minutes and retry.

3. Permission issues that masquerade as this error

Sometimes you're not a member of Schema Admins, and the access check fails before the cache recalc even runs. The error might still surface as 0x20CC in the event log (event ID 1113 or 1115). Check your group membership first—don't assume it's a cache problem if you've never successfully extended the schema before.

4. Corrupted schema partition

In rare cases, the schema partition itself is inconsistent. You'll see the error every time, regardless of cache refresh. You can check with dcdiag /test:schema. If it reports errors, you're looking at an authoritative restore of the schema partition or rebuilding the DC—not a quick fix.

Prevention

  • Always make schema changes on the schema master. Don't let scripts or tools target other DCs.
  • Keep all DCs on the same AD version and apply Windows Updates regularly. Schema updates often come with OS updates, and a mixed-version domain is a known trigger for this error.
  • Back up the schema partition before any change. Use ntdsutil to take an authoritative snapshot, or at least a system state backup.
  • Monitor replication health with repadmin /replsummary weekly. A stuck replication queue can cause stale caches, which leads to exactly this kind of failure.
  • Don't disable the schema cache. Some old blog posts recommend tweaking the registry to bypass the validation—that's a bad idea. The validation is there to protect your directory's integrity.

Once you've cleared the cache and the update goes through, it sticks. The error doesn't come back unless something else mucks with replication or the FSMO roles. Keep an eye on your domain health and you won't see 0x20CC again.

Related Errors in Windows Errors
0XC0150012 STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY (0XC0150012) fix 0XC00D1B76 Fix CLSID 0XC00D1B76: Invalid plug-in in Windows Media Player 0XC01E0347 STATUS_GRAPHICS_INVALID_GAMMA_RAMP (0XC01E0347) Fixed 0X8002802F TYPE_E_DLLFUNCTIONNOTFOUND (0x8002802F) — fixed

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.