| Previous | Next |
| DB_E_DUPLICATEID | SEC_E_BADTRUSTEEID |
DB_E_OBJECTCREATIONLIMITREACHED
Meaning
Windows documents DB_E_OBJECTCREATIONLIMITREACHED 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 case, IDBCreateSession cannot create another session because the provider maximum is already active.
Evidence to collect
When recording diagnostic 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: active session count and configured maximum.
- Evidence 2: outstanding COM references by pool entry.
- Evidence 3: age and workload of sessions awaiting release.
Relevant contract
OLE DB session creation consumes provider resources and establishes transaction and object scope. Session limits include still-referenced sessions and dependent commands or rowsets, not only objects visible in application-level pools.
Investigation of this result should start with the data source object, active session count and all dependent COM references.
Conditions that specifically lead to it
- Cause 1: sessions remain referenced in a pool.
- Cause 2: commands or rowsets keep parent sessions alive.
- Cause 3: concurrent demand exceeds the provider or server limit.
Diagnostic sequence
- Identify the exact failing stage: IDBCreateSession cannot create another session because the provider maximum is already active.
Corrective actions
- Action 1: release dependent commands and rowsets before returning sessions.
- Action 2: bound pool size to provider capacity.
- Action 3: 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.
Retry and recovery
Retry rule: retry after at least one active session and its dependents have been released.
Difference from nearby HRESULT values
DB_E_OBJECTOPEN reports an object blocked by dependents, while DB_E_OBJECTCREATIONLIMITREACHED reports exhausted session capacity.
Official Microsoft references
Looking for a different code? Search another status or error code.