| Previous | Next |
| hrBadBackupDatabaseSize | hrFeatureNotAvailable |
hrTermInProgress
Where the operation crossed the contract
For hrTermInProgress, the useful clue is the engine object that rejected the operation and the state it had reached. The decisive boundary is the instance teardown boundary: new work reached ESE after termination had begun.
This result is the legacy Directory Service backup/restore HRESULT form of the ESE condition normally written as JET_errTermInProgress. Preserve the original value 0xC80003E8 when a wrapper also exposes a signed JET_ERR.
The key comparison for this HRESULT is this: this is later than hrNotInitialized and different from a transient table lock. The first useful observation is to record which component called JetTerm or stopped the owning service and which session or cursor was still active. This this result evidence shows whether startup, normal operation, shutdown, or restore ordering is the actual boundary.
Reconstruct the engine state
A useful trace for this HRESULT should preserve the first failing operation and the state of the ESE instance state and call ordering.
- Code-specific observation: record which component called JetTerm or stopped the owning service and which session or cursor was still active.
- all still-live sessions and child handles at the transition; associate it with this result rather than with a later generic exception.
- the first request accepted after shutdown or before initialization completed; associate it with this result rather than with a later generic exception.
- the successful or failed JetInit/JetTerm sequence and the component that owns it; associate it with it rather than with a later generic exception.
Log lengths, hashes, IDs, flags, and redacted samples where appropriate.
The ESE objects in play
| Diagnostic layer | ESE instance state and call ordering |
|---|---|
| Typical API surface | JetCreateInstance, JetSetSystemParameter, JetInit, JetTerm, and restore entry points |
| Code-specific boundary | the instance teardown boundary: new work reached ESE after termination had begun |
| First corrective direction | stop admitting requests, close dependent cursors and sessions in ownership order, then initialize a fresh instance |
Handles derived from an instance are not reusable after teardown., restore workflows have stricter ordering than ordinary open/attach calls.
Repair without destroying evidence
- Freeze the failing request context and record it,
0xC80003E8, the Jet API name, and the current instance/session ownership. - Verify the code-specific precondition: record which component called JetTerm or stopped the owning service and which session or cursor was still active.
- Apply the narrow correction: stop admitting requests, close dependent cursors and sessions in ownership order, then initialize a fresh instance.
- Before retrying it, reconcile instance state, admission control, and child-handle cleanup.
- confirm both the returned HRESULT and the resulting database, cursor, or file state; then add a regression test that forces the old boundary and proves cleanup leaves no stale handles.
Do not collapse these codes together
This is later than hrNotInitialized and different from a transient table lock. The following neighboring results belong to the same broad subsystem but mark different boundaries:
hrNotInitialized | an ESE call requiring a running instance was made before successful initialization |
|---|---|
hrAfterInitialization | restore processing was requested after the ESE instance had already initialized |
hrInvalidOperation | the engine state, object type, or call ordering makes the requested operation invalid |
Keep it in the incident record; replacing it with “database error” hides whether the next step is handle renewal, schema correction, lock reconciliation, or file preservation.
Developer-facing acceptance test
Build a focused test that reproduces it at the ESE instance state and call ordering layer. Record the precondition, execute one API call, and assert the HRESULT plus the resulting handle and transaction state. The corrected it test should change only the decisive condition—the instance teardown boundary: new work reached ESE after termination had begun—and should prove that cleanup is safe if the call still fails.
Actions that can hide or worsen the problem
- do not reuse instance-derived handles after the lifecycle transition.
- do not start a second initializer to work around an ordering defect.
Technical references
- ESE API functions — used to verify the ESE object model, API ordering, or error family relevant to it.
- Using ESE and esent.h
- JET error codes
- Microsoft: JET_ERR enumeration
Looking for a different code? Search another status or error code.
