What does HRESULT 0xC8000066 (hrFileClose) mean?

 
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 layeroperating-system file, thread, and asynchronous-I/O resources used by ESE
Relevant API surfacedatabase/log file I/O, worker creation, backup reads, and background tasks
Code-specific conditionESE could not complete the operating-system close of a database, log, temporary, or backup file
Narrow corrective directiontreat 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:

hrOutOfThreadsESE could not start a worker thread needed by the requested operation
hrTooManyIOthe engine reached its outstanding-I/O throttle and refused to queue more storage work
hrBFPageNotFoundthe requested page was not present in the buffer-manager context used by the operation

Next actions

  1. Record it, 0xC8000066, the API name, the current phase, and all live context or file owners.
  2. 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.
  3. 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


Looking for a different code? Search another status or error code.