| Previous | Next |
| hrContentsExpired | hrOutOfThreads |
hrFileClose
State represented by this code
hrFileClose means ESE could not complete the operating-system close of a database, log, temporary, or backup file.
The stored value is 0xC8000066 (negative JET error -102; -102). Current ESE documentation uses JET_errFileClose for the corresponding published JET condition.
The first useful distinction is that the data transfer may have succeeded even though final close failed; ignoring it can leave durability and cleanup uncertain. Start by capturing the file path, handle owner, preceding I/O result, underlying Win32 error, and whether flush or remote-storage semantics delayed close.
Data for a reproducible incident
- Code-specific observation: capture the file path, handle owner, preceding I/O result, underlying Win32 error, and whether flush or remote-storage semantics delayed close.
Objects and state involved
| Diagnostic layer | operating-system file, thread, and asynchronous-I/O resources used by ESE |
|---|---|
| Relevant API surface | database/log file I/O, worker creation, backup reads, and background tasks |
| Code-specific condition | ESE could not complete the operating-system close of a database, log, temporary, or backup file |
| Narrow corrective direction | treat close as part of the operation, preserve the first error, and verify the file and volume before reuse |
The first lower-level Win32 error is more useful than later cascading ESE failures. Resource exhaustion should be measured at the moment of failure, before retries alter counts.
Actions that can make diagnosis worse
- Do not discard a close or flush error during cleanup.
- Do not create unbounded retries under resource pressure.
Nearby ESE or AD backup states
It specifically means that the data transfer may have succeeded even though final close failed; ignoring it can leave durability and cleanup uncertain. Related values below can appear in the same workflow but require a different response:
hrOutOfThreads | ESE could not start a worker thread needed by the requested operation |
|---|---|
hrTooManyIO | the engine reached its outstanding-I/O throttle and refused to queue more storage work |
hrBFPageNotFound | the requested page was not present in the buffer-manager context used by the operation |
Next actions
- Record it,
0xC8000066, the API name, the current phase, and all live context or file owners. - Verify the condition by capturing the file path, handle owner, preceding I/O result, underlying Win32 error, and whether flush or remote-storage semantics delayed close.
- Apply only the targeted fix: treat close as part of the operation, preserve the first error, and verify the file and volume before reuse.
Technical references
- ESE error-code table — API ordering, file semantics, warning/error interpretation, or recovery behavior relevant to this HRESULT.
- ESE files
- Open-source ESE implementation
- Microsoft JET_ERR enumeration
Looking for a different code? Search another status or error code.
