| Previous | Next |
| hrNoIdleActivity | hrColumnSetNull |
hrNoWriteLock
Operational meaning
For hrNoWriteLock, a correct handler first decides whether the value is success, warning, or failure, then examines the documented outputs. The decisive boundary is the operation reached transaction level zero without the write lock it expected to observe.
The stored Value is 0x8800042B (positive JET status 1067; 1067). The HRESULT carries a warning, so the call may have useful output or a valid cursor state that must be inspected. Current ESE documentation uses JET_wrnNoWriteLock for the corresponding published JET condition.
The first useful distinction is that the warning is about absent ownership, not necessarily a competing writer or deadlock. Start by capture transaction nesting, cursor ownership, update preparation state, and the call that requested lock-sensitive behavior. That separates a reproducible incident from a later generic cleanup or service error.
Before altering files or retrying
Preserve the first result before retries, cleanup, service restart, or file replacement changes the evidence. The diagnostic record should identify the exact API phase and the owner of every handle or artifact involved.
- Code-specific observation: capture transaction nesting, cursor ownership, update preparation state, and the call that requested lock-sensitive behavior.
- Competing operations if any: record it together with this result and the timestamp of the first occurrence.
- Session and transaction level: record it together with this result and the timestamp of the first occurrence.
- Cursor owner: record it together with this result and the timestamp of the first occurrence.
- Prepared-update state: record it together with this result and the timestamp of the first occurrence.
Use hashes, lengths, IDs, generation numbers, and redacted samples instead of copying directory contents or sensitive database values into routine logs. For this it investigation, a complete provenance chain is often more useful than a second automatic retry.
Comparison points
It specifically means that the warning is about absent ownership, not necessarily a competing writer or deadlock. Related values below can appear in the same workflow but require a different response:
hrRestoreInProgress | another restore context already owns the Directory Service restore workflow |
|---|---|
hrLogBufferTooSmall | the available recovery log buffer cannot hold the log record or sector data required for replay |
hrExistingLogFileIsNotContiguous | the log sequence already present in the target path contains a generation gap required by recovery |
Keep the original constant and hexadecimal value in telemetry. Replacing it with “backup failed” or “database warning” removes the state information needed to select the next legal API call.
Objects and state involved
| Diagnostic layer | transaction nesting, update preparation, and lock ownership |
|---|---|
| Relevant API surface | transaction begin/commit/rollback, cursor updates, write locks, and session-scoped handles |
| Code-specific boundary | the operation reached transaction level zero without the write lock it expected to observe |
| Narrow corrective direction | re-establish the documented transaction and update sequence instead of assuming a lock can be inherited across handles |
Locks and prepared updates are scoped to engine objects and transaction state., absence of a lock is not identical to a conflict with another writer.
Recommended handling
- Record it,
0x8800042B, the API name, the current phase, and all live context or file owners. - Verify the decisive condition by capture transaction nesting, cursor ownership, update preparation state, and the call that requested lock-sensitive behavior.
- Apply only the narrow correction: re-establish the documented transaction and update sequence instead of assuming a lock can be inherited across handles.
- After it, recreate any context invalidated by the failure; do not carry stale HBC, cursor, file, or restore-map state into the retry.
- repeat the smallest non-destructive test that reaches the same boundary, then verify both the return value and the resulting file, cursor, backup, or database state.
Acceptance criteria for a fix
A useful regression test for this HRESULT should force the condition “the operation reached transaction level zero without the write lock it expected to observe”, call one documented API transition, and assert the exact HRESULT. The corrected the case should change only the decisive precondition and should verify cleanup as well as the primary output. For the result backup or restore path, also prove that the resulting set can be enumerated and that no file handle or context remains active after finalization.
Actions that can make diagnosis worse
- do not retry an update before rebuilding the required transaction state.
- do not share session or cursor ownership implicitly across threads.
- do not discard the first lower-level Win32, RPC, or JET result merely because a later cleanup call returned a more familiar error.
Technical references
- ESE transaction model — API ordering, file semantics, warning/error interpretation, or recovery behavior relevant to it.
- ESE warning table
- Open-source ESE implementation
Looking for a different code? Search another status or error code.