What does HRESULT 0xC80004B6 (hrDatabaseCorrupted) mean?

 
Previous Next
hrDatabaseInvalidPages hrDatabaseLocked

hrDatabaseCorrupted

Locate the failure in the Jet call chain

hrDatabaseCorrupted means the database cannot be trusted as a coherent ESE file or is unavailable in a way reported as corruption.

This is the legacy Directory Service backup/restore HRESULT form of JET_errDatabaseCorrupted (0xC80004B6).

The key comparison is: hrInvalidDatabase can simply be the wrong file type; this result warrants corruption/recovery handling. The first useful observation is to preserve the file and logs, inspect header and state with supported read-only tools, and collect storage events. This evidence separates file identity, attachment, open-handle ownership, lock state, and structural validity.

The ESE objects in play

Diagnostic layerdatabase file, attachment state, JET_DBID ownership, and database lifecycle
Typical API surfaceJetCreateDatabase, JetAttachDatabase, JetOpenDatabase, JetCloseDatabase, and JetDetachDatabase
Code-specific conditionthe database cannot be trusted as a coherent ESE file or is unavailable in a way reported as corruption
First corrective directionstop mutation, validate backup/replay options, and avoid creating or attaching a replacement over the evidence

Creating an empty file is not a valid substitute for a missing or corrupted ESE database. Attachment is an instance relationship; opening a database returns a session-scoped database ID.

Questions the logs must answer

  • Code-specific observation: preserve the file and logs, inspect header and state with supported read-only tools, and collect storage events.
  • open tables, transactions, maintenance, and recovery activity using the database; associate it with this result rather than with a later generic exception.
  • the canonical database path and file identity; associate it with this result rather than with a later generic exception.
  • the instance attachment list plus every session-scoped JET_DBID.

Response and verification

  1. Freeze the failing request context and record 0xC80004B6, the Jet API name, and the current instance/session ownership.
  2. Verify the code-specific precondition: preserve the file and logs, inspect header and state with supported read-only tools, and collect storage events.
  3. Apply the targeted fix: stop mutation, validate backup/replay options, and avoid creating or attaching a replacement over the evidence.
  4. Before retrying the operation, reconcile attachment, open/closed state, file identity, and database header status.

Distinguishing signals

hrInvalidDatabaseIdthe JET_DBID no longer identifies an open database in the supplied session
hrDatabaseDuplicatedatabase creation selected a path or identity that already exists
hrInvalidDatabasethe selected file is not a usable ESE database for this operation

Actions that can hide or worsen the problem

  • Do not create an empty database at the expected path as a substitute for the missing or damaged artifact.
  • Do not force detach or delete while owners and recovery state are unknown.

Technical references


Looking for a different code? Search another status or error code.