| Previous | Next |
| DB_E_DUPLICATETABLEID | DB_E_NOLOCALE |
DB_E_TABLEINUSE
Meaning
Windows documents DB_E_TABLEINUSE as “Table is in use”. Here, a table-definition operation cannot alter or drop a table because it is in active use.
Evidence to collect before changing the system
- Evidence 1: the table DBID and blocking object or session.
- Evidence 2: open rowsets, row handles and commands.
- Evidence 3: transaction and lock diagnostics from the provider.
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.
Start with the session performing the definition operation and the table or index identity resolved by that session when investigating this result.
Specific conditions that produce it
- Cause 1: an open rowset references the table.
- Cause 2: another session holds a transaction or statement using it.
- Cause 3: the local consumer leaked row, command or storage objects tied to the table.
Corrective actions
- Action 1: release local dependent objects deterministically.
- Action 2: coordinate destructive DDL with active sessions.
- Action 3: use maintenance windows or bounded wait policies.
Practical incident
A migration attempts to drop a staging table while its own importer still holds a rowset over it; closing that rowset prevents it.
Retry and recovery policy
Retry rule: retry after active use ends and all dependent local objects are released.
Difference from related HRESULT values
DB_E_OBJECTOPEN is a general open-object conflict, while DB_E_TABLEINUSE specifically identifies a table blocked by active use.
Official Microsoft references
Looking for a different code? Search another status or error code.