What does HRESULT 0x80040E17 (DB_E_DUPLICATEDATASOURCE) mean?

 
Previous Next
DB_E_DIALECTNOTSUPPORTED DB_E_CANNOTRESTART

DB_E_DUPLICATEDATASOURCE

Meaning

Windows documents DB_E_DUPLICATEDATASOURCE as “Data source object could not be created because the named data source already exists”. Here, a data source creation or registration operation uses a name that already identifies an existing data source.

Relevant OLE DB contract

This result must be interpreted against this contract: OLE DB objects follow both COM lifetime rules and provider-specific state contracts; open dependents, ownership transfer, aggregation, callbacks and namespace identity must be traced from the exact interface call rather than inferred from a wrapper exception.

Start with the COM object that returned the result and every dependent interface or provider-owned resource involved in the call when investigating this result.

Diagnostic sequence

  1. 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.
  2. Identify the exact stage: a data source creation or registration operation uses a name that already identifies an existing data source.

Specific conditions that produce it

  • Cause 1: the create request is replayed after a partial success.
  • Cause 2: two administrators race to create the same named source.
  • Cause 3: case or normalization rules make apparently different names equivalent.

Evidence to collect before changing the system

  • Evidence 1: the requested name and provider normalization rules.
  • Evidence 2: existing data source identity and creation metadata.
  • Evidence 3: correlation IDs for concurrent or retried create attempts.

Corrective actions

  • Action 1: treat creation as idempotent when the existing source matches the intended configuration.
  • Action 2: choose a distinct name when the existing object is unrelated.
  • Action 3: serialize create-or-open logic around the provider's naming rules.

Retry and recovery policy

Retry rule: retry only with a different name or an idempotent open of the verified existing source.

Difference from related HRESULT values

DB_E_RESOURCEEXISTS applies to an object at a URL, while DB_E_DUPLICATEDATASOURCE specifically concerns a named data source that already exists.

Practical incident

A deployment retries after losing the success response and attempts to create the same catalog again; detecting the matching existing object avoids it.

Official Microsoft references


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