What does HRESULT 0x80040E69 (DB_E_OBJECTCREATIONLIMITREACHED) mean?

 
Previous Next
DB_E_DUPLICATEID SEC_E_BADTRUSTEEID

DB_E_OBJECTCREATIONLIMITREACHED

Session cannot be created because maximum number of active sessions was already reached. Consumer must release one or more sessions before creating a new session object

Exact value and result class

DB_E_OBJECTCREATIONLIMITREACHED has unsigned value 2147749481 (0x80040E69) and signed 32-bit value -2147217815. AllStat describes it as “Session cannot be created because maximum number of active sessions was already reached. Consumer must release one or more sessions before creating a new session object”. In this result, IDBCreateSession cannot create another session because the provider maximum is already active.

The high bit is set, so DB_E_OBJECTCREATIONLIMITREACHED is a failure HRESULT. Its facility is 4 (FACILITY_ITF) and its low code is 3689 (0x0E69). For DB_E_OBJECTCREATIONLIMITREACHED, these fields identify an interface-defined result family; they do not identify the provider instance, method, object generation or partial effects.

Evidence to collect

A useful DB_E_OBJECTCREATIONLIMITREACHED event records provider CLSID and version, process architecture, interface IID and method, object correlation ID, transaction state and the immediately preceding HRESULT. When recording DB_E_OBJECTCREATIONLIMITREACHED data involving connection identifiers, account names and command activity, use types, lengths, hashes or redacted identifiers rather than secrets or complete business data.

  • Evidence 1 for DB_E_OBJECTCREATIONLIMITREACHED: active session count and configured maximum.
  • Evidence 2 for DB_E_OBJECTCREATIONLIMITREACHED: outstanding COM references by pool entry.
  • Evidence 3 for DB_E_OBJECTCREATIONLIMITREACHED: age and workload of sessions awaiting release.

Contract boundary

For DB_E_OBJECTCREATIONLIMITREACHED, OLE DB session creation consumes provider resources and establishes transaction and object scope. For DB_E_OBJECTCREATIONLIMITREACHED, session limits include still-referenced sessions and dependent commands or rowsets, not only objects visible in application-level pools.

Investigation of DB_E_OBJECTCREATIONLIMITREACHED should start with the data source object, active session count and all dependent COM references. Capture DB_E_OBJECTCREATIONLIMITREACHED before ADO, ATL, .NET or a database abstraction layer replaces the native HRESULT with a generic exception.

Conditions that specifically lead to this result

  • Cause 1 for DB_E_OBJECTCREATIONLIMITREACHED: sessions remain referenced in a pool.
  • Cause 2 for DB_E_OBJECTCREATIONLIMITREACHED: commands or rowsets keep parent sessions alive.
  • Cause 3 for DB_E_OBJECTCREATIONLIMITREACHED: concurrent demand exceeds the provider or server limit.

Diagnostic sequence

  1. Capture raw 0x80040E69 and symbolic DB_E_OBJECTCREATIONLIMITREACHED at the native call boundary.
  2. Identify the exact failing stage for DB_E_OBJECTCREATIONLIMITREACHED: IDBCreateSession cannot create another session because the provider maximum is already active.
  3. Retrieve all OLE DB error records for DB_E_OBJECTCREATIONLIMITREACHED before another COM call replaces thread error information.
  4. Compare the live object state and provider-granted capabilities with the input that produced DB_E_OBJECTCREATIONLIMITREACHED.
  5. Reduce the DB_E_OBJECTCREATIONLIMITREACHED operation to the smallest case that preserves the same session contract.
  6. Apply one evidence-backed correction for DB_E_OBJECTCREATIONLIMITREACHED and verify that the result is not merely replaced by a neighboring HRESULT.

Corrective actions

  • Action 1 for DB_E_OBJECTCREATIONLIMITREACHED: release dependent commands and rowsets before returning sessions.
  • Action 2 for DB_E_OBJECTCREATIONLIMITREACHED: bound pool size to provider capacity.
  • Action 3 for DB_E_OBJECTCREATIONLIMITREACHED: queue work or scale data sources rather than spin on creation.

Practical scenario

A pool leaks command references when requests fail; fixing cleanup frees sessions and restores creation capacity. Keeping DB_E_OBJECTCREATIONLIMITREACHED with the method and object state makes this scenario diagnosable instead of reducing it to “database error”.

Developer and operations guidance

Code handling DB_E_OBJECTCREATIONLIMITREACHED should release COM objects in ownership order, retain per-row, per-column or per-property statuses, and log granted capabilities rather than only requested options. While handling DB_E_OBJECTCREATIONLIMITREACHED, opaque values such as HACCESSOR, HROW, HCHAPTER, DBID components and provider handles must remain scoped to the object that issued them.

Operational dashboards for DB_E_OBJECTCREATIONLIMITREACHED should group by provider version, interface, method and normalized failure stage. A DB_E_OBJECTCREATIONLIMITREACHED event must not expose passwords, tokens, full connection strings, unrestricted command text or raw row contents.

Retry and recovery

Retry rule for DB_E_OBJECTCREATIONLIMITREACHED: retry after at least one active session and its dependents have been released. A DB_E_OBJECTCREATIONLIMITREACHED retry is safe only when the relevant input, object generation, capability or external state has changed. Before replaying a modifying call that returned DB_E_OBJECTCREATIONLIMITREACHED, determine whether rows, schema objects or URL resources were partially created or changed.

Do not turn DB_E_OBJECTCREATIONLIMITREACHED into an unbounded retry loop. Preserve cancellation for DB_E_OBJECTCREATIONLIMITREACHED and use a fresh provider object when the failed call may have left local state ambiguous.

Difference from nearby HRESULT values

DB_E_OBJECTOPEN reports an object blocked by dependents, while DB_E_OBJECTCREATIONLIMITREACHED reports exhausted session capacity. Telemetry and remediation for DB_E_OBJECTCREATIONLIMITREACHED should keep these outcomes distinct.

Official Microsoft references


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