Active Directory Jet Database Errors: Causes and Recovery Steps

Fix Active Directory Jet (ESE) database errors such as -1018 JET_errReadVerifyFailure, -510, -528, -1019 and -1206: what each means, the hardware checks, the esentutl and ntdsutil layer checks, restore, rebuild or offline defrag.

Home › Guides › AD Jet database errors

Last updated 20 November 2026

Quick answer

Active Directory stores its data in an Extensible Storage Engine (ESE, also called Jet) database: ntds.dit plus its transaction log files. When the database or a log can't be read or written, the DC reports a negative Jet error such as -1018 JET_errReadVerifyFailure. Microsoft says you may see these during operating system startup, while promoting or demoting a DC, and during Active Directory replication.

What to do depends on the error number (table below), but the pattern is the same for almost all of them:

  1. Find and fix the root cause first. Most Jet errors come from the disk stack: failing disks, controllers, firmware, write caching without battery backup, lost flushes after a power loss or hang, or software (such as antivirus) locking the files.
  2. Check the database from the bottom up: physical consistency, then ESE logical consistency, then Active Directory's own logical consistency.
  3. If the database can't be repaired, restore a system state backup from before the corruption, or force-demote the DC, clean up its metadata and promote it again. If other DCs in the domain are up to date, Microsoft's advice is to lead with promoting additional replicas.

A Jet error that comes with replication error 8451 is covered step by step in replication error 8451 (database error).

Jet errors, causes and what to do

From Microsoft's list of Jet database errors on domain controllers. "Lost flush" (lost I/O) means the disk reported a write as successful, but when the data is read back it isn't there.

ErrorNameCauseWhat to do
-501JET_errLogFileCorruptHardware corrupted the write, or a lost flush made the log unusable. The database is usually left corrupted too.Restore the database from a known good backup, or reinstall the DC.
-510JET_errLogWriteFail (failure writing to log file)A controller, hard drive or other hardware stopped responding to disk commands, or software such as antivirus locked the AD log files.Hardware: a restart restores access; if it keeps happening, upgrade firmware, then replace the controller, then the disk. Software: stop whatever locks the files and check the antivirus exclusions (see below).
-528JET_errMissingLogFileAn unexpected shutdown (for example a power outage), an administrator changing log files (such as copying in an old copy), or faulty backup or restore software if it happens right after a restore.Restore the database from a known good backup, or reinstall the DC.
-543JET_errRequiredLogFilesMissingLogs modified by an administrator, or a lost flush on shutdown.Same as -528.
-550JET_errDatabaseDirtyShutdownLogs modified by an administrator, or a lost flush on shutdown.No separate fix listed: check the hardware and how the files were handled (steps 1 and 2).
-551JET_errConsistentTimeMismatchLogs modified by an administrator, or a lost flush on shutdown.As for -550.
-567JET_errDbTimeTooNewThe disk subsystem lost an I/O, probably during a hang or an unscheduled shutdown.Check the battery backup for the disk cache.
-1018JET_errReadVerifyFailure (checksum error on a database page)The database is corrupted because of a hardware failure.Evaluate the whole disk stack (see the -1018 section). Integrity checks and semantic analysis can't repair it.
-1019JET_errPageNotInitialized (blank database page)Like -1018, but caused by a lost page flush.Server-class hardware, a UPS, a controller with battery backup, write-back cache off; then as for -1018.
-1021JET_errDiskReadVerificationFailure (the OS returned ERROR_CRC from file IO)A -1018 at the disk level: the drive itself returned a bad checksum, possibly bad blocks it tracks.Removing and reinstalling Active Directory on the DC may get the data stored on healthy blocks.
-1022JET_errDiskIO (disk IO error)A generic, non-specific disk error, for example a controller returning "device not working". Some disks and Jet versions return it for CRC problems.Verify the whole driver stack.
-1206JET_errDatabaseCorruptedThe same as a missing or corrupt log file: a lost flush occurred.Treat it like -528: restore from a known good backup or reinstall the DC.
-1216JET_errAttachedDatabaseMismatchLogs modified by an administrator, or a lost flush on shutdown.As for -550.
-1605JET_errKeyDuplicate (illegal duplicate key)Sporadic; can be caused by index corruption.Remove and reinstall Active Directory on the DC. Run ntdsutil semantic database analysis; if the problem stays, do an offline defragmentation.
-1811(no name given)Logs modified by an administrator, or a lost flush on shutdown.As for -550.

-1021 was added in Windows Server 2008 R2; earlier versions return -1022 instead.

Error -1018 and -1019 in detail

A -1018 means the page checksum didn't match: the data on disk is damaged. Microsoft's checklist:

So: try an offline defrag; otherwise restore a system state backup from before the corruption, or force-demote, do a full metadata cleanup and promote again. If -1018 comes back, repeat until the hardware root cause is fixed.

Virtualized DCs: Microsoft has seen -1018 on DCs running on the same virtual host only where the host used an on-board RAID controller. The UPS didn't have enough power for the on-board controller to commit its changes to disk after the power failed. The workaround is to have the UPS software shut down the virtual guests when power is lost. Servers with dedicated RAID controllers that have their own battery backup don't get this -1018.

A -1019 (blank page) is caused by a lost page flush. Microsoft warns that a lost flush can be a critical USN change, and failing to apply the same change to local DCs or transitive replication partners can do harm where there's only one replication path. Its hardware advice: deploy the OS on server-class hardware and disk components, put a UPS on the host, use a disk controller with on-board battery backup, disable the write-back cache on the drive controller, and don't put ntds.dit and the log files on IDE drives.

Error -510 and antivirus locks

If software is locking the AD log files, stop the services that create the locks and make sure the right files are in your antivirus exclusion list. Windows Server 2016 excludes certain files and folders from antivirus scanning automatically. If the hardware is fine and the exclusions are right, rule out non-Microsoft software:

  1. Press Windows key + R, type msconfig and select OK.
  2. On the Services tab, select Hide all Microsoft services and clear the check boxes for the remaining (third-party) services.
  3. Disable all enabled startup items.
  4. Restart the server.

Step 1: Check the hardware and what happened before the error

Make sure every AD database and log file sits on suitable hardware. Microsoft notes that many (not all) SATA and IDE drives don't support the write flush command, while SAS drives do, and recommends SAS drives on SAS controllers with battery backup on any write-caching element.

When a DC fails to start with the LSASS boot errors 0xc00002e1 or 0xc00002e2, check what the events just before them show:

For guest DCs on Windows Server 2012 Hyper-V hosts with IDE-attached virtual disks, Microsoft points to the fixes for loss of consistency after an unplanned host restart.

Step 2: Check the files in Directory Services Restore Mode

  1. Start the DC in Directory Services Restore Mode (DSRM).
  2. Make a system state backup first, so you can roll back anything you change during the recovery. Also find out up front where the most recent system state backup is, because whether one exists shapes your recovery plan.
  3. Find the database and log paths with ntdsutil:
    ntdsutil
    activate instance ntds
    files
    info
    quit
    quit
    info shows the path and size of the database and its log files. Note them.
  4. Check that the drive holding ntds.dit or the logs is available when the OS starts, and that the files really are at those paths. If they aren't, search every drive and volume for the ntds.dit and log files that belong to this AD instance. There can be several copies; use the date and time stamps to pick the right one, then correct the database and log paths as needed.
  5. Check the permissions. Microsoft's table (written for Windows Server 2003) for the folder that holds ntds.dit and the logs, and the log files themselves:
    AccountPermissionsApplies to
    SystemFull ControlThis folder, subfolders and files
    AdministratorsFull ControlThis folder, subfolders and files
    Creator OwnerFull ControlSubfolders and files only
    Local ServiceCreate Folders / Append DataThis folder and subfolders
    System also needs full control of the root of the volume that hosts the files and of the %windir% folder.
  6. Check that the right log files are in the log folder. Microsoft's article says the /MH header dump identifies the log files that are required. That switch belongs to esentutl: /mh dumps the database header, which also shows whether the database is in a Clean Shutdown or Dirty Shutdown state:
    esentutl /mh c:\windows\ntds\ntds.dit
  7. Never copy the database or log files from one DC to another to make the second DC work.
  8. Make sure disk or file compression isn't turned on for any volume that hosts ntds.dit or the logs.

Step 3: Validate the database from the bottom up

Only go up a layer when the layer below completes without errors. Microsoft warns that chasing errors from the ESE logical or application logical checks while physical consistency still fails leads you down the wrong path.

Layerntdsutilesentutl
1. Physical consistencyno equivalentesentutl /k
2. ESE logical consistencyfiles, integrityesentutl /g
3. Application logical consistencysemantic database analysis, then offline defragno equivalent for semantic analysis, then esentutl /d
esentutl /k c:\windows\ntds\ntds.dit
esentutl /g c:\windows\ntds\ntds.dit

esentutl /k verifies the checksums of the database (it doesn't run database recovery). Look up the first Jet error a layer reports in the table above and fix it if you can. Some Jet errors can be repaired with ntdsutil and esentutl; others can't, and any attempt will fail. Then your only options may be a system state backup from before the corruption or a new server.

NTDS General event 1168 also returns a Jet error, but Microsoft calls it an application layer error: don't act on it unless the physical and ESE logical consistency checks (in that order) pass without errors.

Offline defragmentation

Several fixes above end in an offline defrag. It builds a new copy of the database without internal fragmentation and re-creates all indexes. Microsoft's steps, in short:

  1. Back up Active Directory (a system state backup with Windows Server Backup).
  2. Stop the Active Directory Domain Services service, or restart into Directory Services Restore Mode (msconfig, Boot tab, Safe boot with Active Directory repair) and sign in with the DSRM administrator password.
  3. ntdsutil uses the TMP and TEMP variables for a temporary database. If that volume doesn't have room for the compacted database, the compact stops with error -1808 (JET_errDiskFull). Point them at a volume with enough space:
    md d:\temp
    set tmp=d:\temp
    set temp=d:\temp
  4. In ntdsutil: activate instance ntds, files, info (note the path), then compact to <drive>:\<directory> (quote the path if it has spaces), then quit twice.
  5. If the compact succeeded, follow ntdsutil's on-screen instructions: delete the *.log files in the log folder and copy the new ntds.dit over the old one at the path you noted. You don't have to delete edb.chk.
  6. Restart AD DS, or clear Safe boot in msconfig and restart.

Related tools and guides

Look up 1168, 1173 and 2108 in the Windows Event ID Lookup, copy the esentutl /k, esentutl /mh and ntdsutil files info lines from the PowerShell Cheat Sheet, pull the Jet error numbers out of exported Directory Service events with the Regex Tester, check which site and subnet the affected DC sits in before you plan a rebuild with the IPv4 Subnet Calculator or IPv6 Subnet Calculator, and identify the network adapter vendor on a virtualized DC with the MAC Vendor Lookup. Related guides: replication error 8451 (database error), replication error 1127 (disk operation failed), replication error 8333 and events 1083 and 1061.

Every AD replication error code with its cause and fix: common Active Directory replication errors.

FAQ

What is a Jet error on a domain controller?

Active Directory keeps its data in an Extensible Storage Engine (Jet) database, ntds.dit, with transaction log files. A Jet error is a negative number such as -1018 that the database engine returns when it can't read or write the database or a log. You may see them at startup, during DC promotion or demotion, and during replication.

What does Jet error -1018 mean?

JET_errReadVerifyFailure: a checksum error on a database page, meaning the database was corrupted by a hardware failure. Integrity checks and semantic analysis can't repair it. Fix the disk stack, then try an offline defrag, restore a system state backup from before the corruption, or force-demote, clean up metadata and repromote.

What is the difference between Jet errors -1018, -1019 and -1021?

-1018 is a page checksum mismatch. -1019 is a blank page caused by a lost page flush. -1021, new in Windows Server 2008 R2, is a -1018 detected at the disk level: the drive itself returned a CRC error; earlier versions report -1022 instead.

In what order should I check the AD database?

From the bottom up: physical consistency with esentutl /k, then ESE logical consistency with ntdsutil files integrity or esentutl /g, then application logical consistency with ntdsutil semantic database analysis. Only move up a layer when the one below passes.

Can I copy ntds.dit from another domain controller?

No. Microsoft says the database or log files from one DC should never be copied to another DC to make the second one work. Restore that DC's own system state backup or rebuild it as a new replica instead.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.