| Previous | Next |
| DB_E_NOINDEX | DB_E_NOTABLE |
DB_E_INDEXINUSE
Meaning
Windows documents DB_E_INDEXINUSE as “Index is in use”. Here, a schema operation cannot alter or drop an index because the index is currently in use.
Evidence to collect before changing the system
- Evidence 1: the index DBID and blocking session or object.
- Evidence 2: open index rowsets and row handles.
- Evidence 3: transaction and command activity using the index.
Relevant OLE DB contract
This result must be interpreted against this contract: OLE DB data-definition interfaces operate on provider-scoped table and index DBIDs; existence, identifier validity and active use are separate outcomes, and schema changes must account for open rowsets and transactions.
Specific conditions that produce it
- Cause 1: an open index rowset still references it.
- Cause 2: another command or transaction is using the index.
- Cause 3: the consumer leaked an interface tied to the index.
Corrective actions
- Action 1: close local index rowsets and release dependent handles.
- Action 2: coordinate schema changes with active workloads.
- Action 3: use bounded waiting or maintenance windows rather than repeated destructive attempts.
Practical incident
A migration tries to drop an index while the same process still holds an IRowsetIndex object; releasing it first prevents it. The diagnostic value comes from retaining it together with the failing interface and object state, not from reducing every provider result to “database error”.
Retry and recovery policy
Retry rule: retry after the blocking use has ended and dependent objects are released. A safe retry must use a changed input, object instance, provider capability or state transition. If the call returning it could have created, updated, deleted or copied data, determine partial completion before replaying it.
Difference from related HRESULT values
DB_E_TABLEINUSE concerns a table, while it specifically names an index whose active use blocks the operation. Keep these outcomes separate in telemetry and user-facing remediation because it requires a different next action.
Official Microsoft references
Looking for a different code? Search another status or error code.