What does HRESULT 0xC8000522 (hrObjectDuplicate) mean?

 
Previous Next
hrIllegalOperation hrInvalidObject

hrObjectDuplicate

Why this is more specific than the message text

hrObjectDuplicate means schema creation collided with an existing object name in the same namespace.

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

The key comparison is: hrTableDuplicate and hrIndexDuplicate identify narrower object classes. The first useful observation is to enumerate tables, indexes, and other object metadata using the exact normalized name. This evidence distinguishes name collisions, stale table handles, active users, locks, and structural dependencies.

Related ESE conditions

hrInvalidTableIdthe JET_TABLEID is stale, closed, or belongs to another session/database
hrObjectNotFounda valid object name does not exist in the selected database or table scope
hrInvalidObjectthe resolved object type or state is incompatible with the requested operation

The ESE objects in play

Diagnostic layertable and schema-object ownership, locks, and structural dependencies
Typical API surfaceJetOpenTable, JetCreateTableColumnIndex, JetDeleteTable, and schema enumeration APIs
Code-specific conditionschema creation collided with an existing object name in the same namespace
First corrective directioncompare the existing definition with the desired schema and make the migration safely idempotent

Schema changes commonly require exclusive access and a specific transaction state. Object existence should be compared with the full expected definition before a migration is skipped.

Data for a reproducible case

  • Code-specific observation: enumerate tables, indexes, and other object metadata using the exact normalized name.
  • all JET_TABLEID owners, open modes, transactions, and current indexes; associate it with this result rather than with a later generic exception.
  • the exact schema migration step and whether a previous attempt committed.
  • the table/object metadata and normalized name.

Corrective workflow

  1. Freeze the failing request context and record 0xC8000522, the Jet API name, and the current instance/session ownership.
  2. Verify the code-specific precondition: enumerate tables, indexes, and other object metadata using the exact normalized name.
  3. Apply the targeted fix: compare the existing definition with the desired schema and make the migration safely idempotent.
  4. Before retrying the operation, reconcile object definition, exclusive-access state, and migration version.

Actions that can hide or worsen the problem

  • Do not force a schema mutation while table users remain active.
  • Do not skip a migration merely because an object with the same name exists.

Technical references


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