| 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 layer | database file, attachment state, JET_DBID ownership, and database lifecycle |
|---|---|
| Typical API surface | JetCreateDatabase, JetAttachDatabase, JetOpenDatabase, JetCloseDatabase, and JetDetachDatabase |
| Code-specific condition | the database cannot be trusted as a coherent ESE file or is unavailable in a way reported as corruption |
| First corrective direction | stop 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
- Freeze the failing request context and record
0xC80004B6, the Jet API name, and the current instance/session ownership. - Verify the code-specific precondition: preserve the file and logs, inspect header and state with supported read-only tools, and collect storage events.
- Apply the targeted fix: stop mutation, validate backup/replay options, and avoid creating or attaching a replacement over the evidence.
- Before retrying the operation, reconcile attachment, open/closed state, file identity, and database header status.
Distinguishing signals
hrInvalidDatabaseId | the JET_DBID no longer identifies an open database in the supplied session |
|---|---|
hrDatabaseDuplicate | database creation selected a path or identity that already exists |
hrInvalidDatabase | the 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.