| Previous | Next |
| DB_E_DUPLICATECOLUMNID | DB_E_TABLEINUSE |
DB_E_DUPLICATETABLEID
Meaning
Windows documents DB_E_DUPLICATETABLEID as “Table already exists”. Here, a table-creation operation requests an identifier already used by an existing table.
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.
Diagnostic sequence
- Capture this result immediately at the native OLE DB return and obtain the current OLE DB error object before another COM call replaces thread error information.
- Identify the exact stage: a table-creation operation requests an identifier already used by an existing table.
Specific conditions that produce it
- Cause 1: the migration is replayed.
- Cause 2: two creators race on the same table name.
- Cause 3: provider normalization makes the requested name collide.
Evidence to collect before changing the system
- Evidence 1: the requested table DBID.
- Evidence 2: the existing table definition.
- Evidence 3: deployment and transaction correlation IDs.
Corrective actions
- Action 1: treat a matching existing table as idempotent only after comparing its definition.
- Action 2: choose a different identifier for an unrelated table.
- Action 3: serialize schema creation for the same namespace.
Retry and recovery policy
Retry rule: retry only with a unique identifier or an idempotent open of the verified existing table.
Difference from related HRESULT values
DB_E_DUPLICATEINDEXID identifies an existing index, while DB_E_DUPLICATETABLEID identifies an existing table.
Practical incident
A deployment retries after losing its success response and attempts to recreate the same table; comparing schemas prevents it.
Official Microsoft references
Looking for a different code? Search another status or error code.
