| Previous | Next |
| DB_E_NOSOURCEOBJECT | DB_E_NOTCOLLECTION |
DB_E_RESOURCELOCKED
OLE DB object represented by this URL is locked by one or more other processes
Exact value and result class
DB_E_RESOURCELOCKED has unsigned value 2147749522 (0x80040E92) and signed 32-bit value -2147217774. AllStat describes it as “OLE DB object represented by this URL is locked by one or more other processes”. In this result, the object represented by the URL is locked by another process or incompatible owner.
The high bit is set, so DB_E_RESOURCELOCKED is a failure HRESULT. Its facility is 4 (FACILITY_ITF) and its low code is 3730 (0x0E92). For DB_E_RESOURCELOCKED, 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_RESOURCELOCKED 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_RESOURCELOCKED data involving URLs containing credentials, tenant paths and remote object names, use types, lengths, hashes or redacted identifiers rather than secrets or complete business data.
- Evidence 1 for
DB_E_RESOURCELOCKED: normalized URL and requested access mode. - Evidence 2 for
DB_E_RESOURCELOCKED: lock owner or lease metadata when available. - Evidence 3 for
DB_E_RESOURCELOCKED: open handles and process lifetime around the resource.
Contract boundary
For DB_E_RESOURCELOCKED, the OLE DB binder model maps URLs to row, rowset, stream or collection objects. For DB_E_RESOURCELOCKED, URL scope, requested object type, bind flags, asynchronous capability, locks and server reachability are independent parts of the binding contract.
Investigation of DB_E_RESOURCELOCKED should start with the binder or session, normalized URL, requested GUID/object type and DBBINDURLSTATUS result. Capture DB_E_RESOURCELOCKED 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_RESOURCELOCKED: another writer holds an exclusive resource lock. - Cause 2 for
DB_E_RESOURCELOCKED: a stale process still owns an open row or stream. - Cause 3 for
DB_E_RESOURCELOCKED: the provider maps a server-side lease or checkout to the URL.
Diagnostic sequence
- Capture raw
0x80040E92and symbolicDB_E_RESOURCELOCKEDat the native call boundary. - Identify the exact failing stage for
DB_E_RESOURCELOCKED: the object represented by the URL is locked by another process or incompatible owner. - Retrieve all OLE DB error records for
DB_E_RESOURCELOCKEDbefore another COM call replaces thread error information. - Compare the live object state and provider-granted capabilities with the input that produced
DB_E_RESOURCELOCKED. - Reduce the
DB_E_RESOURCELOCKEDoperation to the smallest case that preserves the same binder contract. - Apply one evidence-backed correction for
DB_E_RESOURCELOCKEDand verify that the result is not merely replaced by a neighboring HRESULT.
Corrective actions
- Action 1 for
DB_E_RESOURCELOCKED: release local objects before assuming an external conflict. - Action 2 for
DB_E_RESOURCELOCKED: coordinate through provider locking or checkout APIs. - Action 3 for
DB_E_RESOURCELOCKED: use bounded backoff only when lock ownership is transient.
Practical scenario
An editor crashes while holding a provider lease; lease expiry and state refresh allow a later write to proceed. Keeping DB_E_RESOURCELOCKED 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_RESOURCELOCKED 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_RESOURCELOCKED, 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_RESOURCELOCKED should group by provider version, interface, method and normalized failure stage. A DB_E_RESOURCELOCKED event must not expose passwords, tokens, full connection strings, unrestricted command text or raw row contents.
Retry and recovery
Retry rule for DB_E_RESOURCELOCKED: retry after the conflicting lock has been released and the resource generation revalidated. A DB_E_RESOURCELOCKED 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_RESOURCELOCKED, determine whether rows, schema objects or URL resources were partially created or changed.
Do not turn DB_E_RESOURCELOCKED into an unbounded retry loop. Preserve cancellation for DB_E_RESOURCELOCKED and use a fresh provider object when the failed call may have left local state ambiguous.
Difference from nearby HRESULT values
DB_E_READONLY means the object cannot be written by contract, while DB_E_RESOURCELOCKED means current lock state prevents access. Telemetry and remediation for DB_E_RESOURCELOCKED should keep these outcomes distinct.
Official Microsoft references
- Microsoft: direct binding in OLE DB — official documentation relevant to
DB_E_RESOURCELOCKED. - Microsoft: OLE DB root binder object — official documentation relevant to
DB_E_RESOURCELOCKED. - Microsoft: OLE DB row objects — official documentation relevant to
DB_E_RESOURCELOCKED.
Looking for a different code? Search another status or error code.