Fix it now
0xC00002E2 is STATUS_DS_INIT_FAILURE. Microsoft publishes five causes and only one of them is a damaged database: no access to the disk holding NTDS.DIT, that disk out of free space, the file missing, a SAN policy leaving non-OS disks offline, or the database itself corrupt. Check the first four before you repair anything.
bcdedit /set {default} safeboot dsrepair
diskpart
list disk
list volume
exit
esentutl /mh C:\Windows\NTDS\ntds.dit
- Restart into Directory Services Restore Mode and sign in with the local account
.\Administratorand the DSRM password set when the server was promoted. - Confirm the disk holding NTDS is present and online. On a virtual machine,
diskpartthensanshows the SAN policy – if non-OS disks are offline,select disk <n>,attributes disk clear readonly,online diskbrings them back, and that alone resolves a large share of these. - Check free space on the volumes holding the database and the logs. A full volume is the most common cause and needs nothing more than clearing space.
- Read the database header with
esentutl /mhand note the state line. If it says clean shutdown, the database is not your problem. - Return to a normal start with
bcdedit /deletevalue {default} safebootand restart.
Take a copy of the whole NTDS folder before running anything that writes to it. Restoring a copy you made is always cheaper than recovering from a repair that went wrong.
If the server starts and advertises itself, you are done. If the database really is inconsistent, the next section sets out the order Microsoft documents for checking it.
Why it happens
Active Directory Domain Services is an ESE database: ntds.dit plus a set of transaction logs and a checkpoint file. On every start the directory service opens that database and, if the last shutdown was not clean, replays whatever the logs hold to bring it to a consistent point. Only then does the directory service report itself started, and only then does the Security Accounts Manager have a source of accounts to work from. If either step fails the machine cannot authenticate anyone, including you, which is why it stops rather than showing a sign-in screen.
Microsoft’s documented causes for 0xC00002E2 are worth reading in order, because four of the five are about reaching the file rather than about the file being bad. There is no access to the disk holding the local AD database. The disk holding it has run out of free space. The file is missing. The machine has multiple disks and the SAN policy is not set to ONLINEALL, leaving non-OS disks offline. And, last, the database is corrupt.
On a virtual domain controller the SAN policy case is the one that wastes the most time, because a controller whose database volume is simply offline behaves exactly like one whose database is damaged. It comes back after a restore to a different host, after a storage migration, or after a template was built with a policy other than ONLINEALL. The fix is diskpart, not esentutl.
0xC0000244 sits apart from the rest. Microsoft publishes it as STOP: C0000244 {Audit Failed}: An attempt to generate a security audit failed, raised when the policy Audit: Shut down system immediately if unable to log security audits is enabled and the security log is full with entries that cannot be overwritten. The published recovery is to sign in, archive the log if you want it, clear it, and reset the option – not to touch the directory at all.
The database volume is offline or unreachable
You have this one if A virtual controller that was migrated, restored to a different host or had storage reattached. The NTDS volume does not appear in Windows even though the disk exists.
- In Directory Services Restore Mode, run
diskpart, thenlist disk, and look for a disk marked offline. - Bring it back:
select disk <n>,attributes disk clear readonly,online disk. - Check the policy with
sanand set it to ONLINEALL if that is what your build expects. - Restart normally and confirm the directory service starts before changing anything else.
Confirm where the database is meant to be first. The DSA Database file and Database log files path values under the NTDS parameters key record it, and they are readable from an offline SYSTEM hive if you have to.
The volume holding the database or its logs is full
You have this one if Free space at or near zero on the NTDS volume. The server ran for years and stopped one morning with no change having been made.
- In Directory Services Restore Mode, clear space. Old application logs, crash dumps and temporary servicing folders are the usual candidates.
- If the database and logs share a chronically short system volume, move the logs:
ntdsutil, thenactivate instance ntds,files,move logs to <path>, thenquittwice. - Restart normally, confirm the directory service starts, then put monitoring on that volume.
Leave real headroom. The database needs room to extend, and log replay after an unclean shutdown needs room of its own.
The database is genuinely inconsistent
You have this one if esentutl /mh reports a state other than clean shutdown, usually after a power loss, a host crash or a storage disconnection.
- Copy the entire NTDS folder elsewhere before touching anything.
- Work bottom-up, as Microsoft documents. Physical consistency first:
esentutl /kagainst the database file. - Then ESE logical consistency:
ntdsutil,activate instance ntds,files,integrity– oresentutl /g. - Then application logical consistency:
ntdsutil,semantic database analysis,go fixup, followed by an offline defragmentation.
Microsoft warns that troubleshooting an ESE logical or application logical error while physical consistency is still failing leads down an improper troubleshooting path. Do not skip the first check.
The audit policy halted the system
You have this one if 0xC0000244, the security event log is at its configured maximum size, and the policy that shuts the system down on audit failure is enabled.
- Sign in, archive the security event log if you need to keep it, and clear it.
- Reset the Audit: Shut down system immediately if unable to log security audits option to what your policy actually intends.
- Review log retention. Either allow the log to overwrite old events, or enlarge it and forward events off the machine so it never fills.
That shutdown is abrupt rather than graceful, so treat the machine as one that lost power: check the volume and the database state before assuming it is fine.
Full reference
Checking the database in the order Microsoft documents
| Layer | NTDSUTIL | ESENTUTL |
|---|---|---|
| 1. Physical consistency | No equivalent | esentutl /k |
| 2. ESE logical consistency | files then integrity |
esentutl /g |
| 3. Application logical consistency | semantic database analysis, plus an offline defragmentation |
No single equivalent |
The point of the order is that a failure at one layer makes the layers above it meaningless. A physical inconsistency – which usually means the storage under the database – will produce logical errors that are symptoms rather than faults, and chasing them wastes a maintenance window.
Log replay and header inspection
| Command | Purpose |
|---|---|
esentutl /mh <path>\ntds.dit |
Dumps the database header, including whether it shut down cleanly |
esentutl /r edb /l <logpath> /s <syspath> |
Recovery: replays logs to bring the database to a clean-shutdown state |
ntdsutil then activate instance ntds, files, info |
Reports the database path and size |
ntdsutil then files, move logs to <path> |
Moves the transaction logs to another volume |
bcdedit /set {default} safeboot dsrepair |
Forces the next start into Directory Services Restore Mode |
Under no circumstances copy the database or log files from one domain controller to another to make the second one functional. Microsoft states this plainly, and the divergence it creates is far harder to resolve than the outage you started with. The same reasoning rules out reverting a virtual machine snapshot or restoring a whole-disk image taken outside a supported backup product: use a system state restore performed in Directory Services Restore Mode.
When the database cannot be repaired
Microsoft says it directly: some Jet database errors cannot be repaired, and any attempt to repair them will fail. In that case the recourse is to restore a system state backup that predates the corruption, or to build a new server. Where replica domain controllers are up to date, Microsoft’s stated preference is to promote additional replicas into the domain after mitigating the root cause of any hardware or software error. That is usually the fastest route back to a healthy domain, and it is also the one that leaves you with a server you can trust afterwards.
The hard repair, esentutl /p, is not part of Microsoft’s documented recovery path for AD DS. Treat it as a way to extract data from a database you are about to abandon rather than as a repair you keep running on, and plan to demote and rebuild any controller you run it against.
Storage and the reason this keeps happening
Microsoft’s guidance on where an AD database should live is specific: databases and log files should use SAS drives on SAS controllers, on domain controllers that have battery backup on any write-caching element. A controller that has lost its database twice on consumer storage or on a cache without battery backup is not unlucky. Fix the storage before repairing the database again.
Codes and events you will see alongside
- 0xC00002E3, the Security Accounts Manager failing to initialise, sits beneath the directory service. Microsoft publishes no meaning for the value itself, so read it as the layer below having failed and check the SYSTEM hive and the disk as well as the database.
- 0xC00002E1 is named by Microsoft alongside 0xC00002E2 as a stop error for which Directory Services Restore Mode is the documented step, but no meaning is published for the value.
- Event ID 1168 in the Directory Service log carries an internal error. The number is not the useful part; the internal ID and error values inside the event are.
- Run
dcdiagandrepadmin /showreplbefore declaring the controller healthy. A server that starts is not the same as a server that is replicating. - Confirm the SYSVOL and NETLOGON shares are published, because a controller that starts without them authenticates nobody usefully.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
0xC00002E2 |
STATUS_DS_INIT_FAILURE. Microsoft’s documented causes are no access to the disk holding NTDS.DIT, that disk out of free space, the file missing, a SAN policy other than ONLINEALL leaving non-OS disks offline, or the database being corrupt | Microsoft Learn |
0xC00002E3 |
Reported when the Security Accounts Manager cannot initialise, which is the layer beneath the directory service. Microsoft publishes no meaning for this value on any page we could reach | not published by the vendor |
0xC0000244 |
{Audit Failed}: an attempt to generate a security audit failed. Raised when the policy to shut down the system if security audits cannot be logged is enabled and the security log is full. Recovery is to sign in, archive and clear the log, then reset the option | Microsoft Learn |
0xC00002E1 |
Named by Microsoft alongside 0xC00002E2 as a stop error for which Directory Services Restore Mode is the documented step, but no meaning is published for the value itself | not published by the vendor |
Event ID 1168 |
An internal error logged by the directory service. No current Microsoft reference publishes a meaning for the ID; the internal ID and error values carried inside the event are the part worth recording | not published by the vendor |
Confirm the fix worked
- The server restarts normally and signs in a domain account.
dcdiagpasses, particularly the services, replication and advertising checks.repadmin /showreplshows replication with partners as current.- The SYSVOL and NETLOGON shares are published.
esentutl /mhagainst the database reports a clean shutdown state, and the volume holding it has real free space.
Questions people ask about this
I do not know the DSRM password. What now?
It can be reset with ntdsutil from another domain controller, but only against a server that is running and reachable, which this one is not. If it is unknown and the machine will not start, your options are a system state restore from before the problem, or rebuilding the controller.
Is it safe to run a hard repair to get the server back quickly?
It is not part of Microsoft’s documented recovery path for AD DS. A hard repair discards what it cannot reconcile, and a controller repaired that way should be demoted and rebuilt rather than kept in production. Microsoft’s stated recourse for unrepairable errors is a system state restore or a new server.
My virtual DC will not boot but the database is fine. What did I miss?
Check whether the disk holding NTDS is online. Microsoft names a SAN policy other than ONLINEALL, leaving non-OS disks offline, as a documented cause of 0xC00002E2. In diskpart, list disk shows it, and clearing readonly and bringing the disk online resolves it without touching the database.
Can I copy ntds.dit from a healthy DC?
No. Microsoft states that under no circumstances should the database or log files from one domain controller be copied to another to make the second one functional. Promote a fresh replica instead.
Does fixing this cost anything?
No. Every tool involved ships with Windows Server and nothing here is a licensing fault. If you rebuild the controller you reuse the same Windows Server licence for that hardware, and it picks up activation from your existing infrastructure.
