Site icon EfmSoft

What does HRESULT 0xC8000516 (hrTableLocked) mean?

 
Previous Next
hrDatabaseLocked hrTableDuplicate

hrTableLocked

The object and state that matter

hrTableLocked means the target table is under a lock incompatible with the requested operation.

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

The key comparison is: hrTableInUse concerns active references; this result is specifically the lock conflict. The first useful observation is to record table name, locking session, transaction, schema operation, and open cursor modes. This evidence distinguishes name collisions, stale table handles, active users, locks, and structural dependencies.

Minimum useful trace

How to avoid a false diagnosis

hrTableInUseopen cursors or operations prevent an exclusive table change
hrTableNotEmptya clustered-index definition or structural operation requires an empty table but rows already exist
hrTableDuplicatetable creation reused a name already present in the database

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 conditionthe target table is under a lock incompatible with the requested operation
First corrective directionfinish or rollback the owning transaction and reacquire the table in a consistent lock order

A JET_TABLEID is a cursor-like handle owned by a session, not a persistent table identifier. Schema changes commonly require exclusive access and a specific transaction state.

Safe recovery sequence

  1. Freeze the failing request context and record 0xC8000516, the Jet API name, and the current instance/session ownership.
  2. Verify the code-specific precondition: record table name, locking session, transaction, schema operation, and open cursor modes.
  3. Apply the targeted fix: finish or rollback the owning transaction and reacquire the table in a consistent lock order.
  4. Before retrying the operation, reconcile object definition, exclusive-access state, and migration version.

Actions that can hide or worsen the problem

Technical references


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

Exit mobile version