Site icon EfmSoft

What does HRESULT 0xC8000580 (hrIndexHasClustered) mean?

 
Previous Next
hrIndexInvalidDef hrTooManyOpenIndexes

hrIndexHasClustered

The object and state that matter

hrIndexHasClustered means the table already owns a clustered index and cannot accept another clustered layout.

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

The key comparison is: hrIndexHasPrimary concerns primary-key designation; clustered storage order is the decisive issue here. The first useful observation is to enumerate index flags and determine whether an earlier migration created the existing clustered index. This evidence separates index schema, current-index cursor state, key construction, and duplicate data.

Minimum useful trace

How to avoid a false diagnosis

hrIndexDuplicatean index with the requested name or equivalent definition already exists
hrIndexHasPrimarythe table already has a primary index and the request attempts to define another
hrIndexCantBuildESE cannot construct the requested clustered index from the existing table and definition

The ESE objects in play

Diagnostic layerB-tree index definition, key construction, uniqueness, and current-index cursor state
Typical API surfaceJetCreateIndex, JetDeleteIndex, JetSetCurrentIndex, JetMakeKey, JetSeek, and JetSetIndexRange
Code-specific conditionthe table already owns a clustered index and cannot accept another clustered layout
First corrective directionchoose one clustered layout or migrate rows into a newly defined table

Index schema and runtime key-building state are separate diagnostic layers. Key bytes depend on segment order, column representation, collation, null rules, and sort direction.

Safe recovery sequence

  1. Freeze the failing request context and record 0xC8000580, the Jet API name, and the current instance/session ownership.
  2. Verify the code-specific precondition: enumerate index flags and determine whether an earlier migration created the existing clustered index.
  3. Apply the targeted fix: choose one clustered layout or migrate rows into a newly defined table.
  4. Before retrying the operation, reconcile index definition, selected cursor index, and key or uniqueness outcome.

Actions that can hide or worsen the problem

Technical references


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

Exit mobile version