| Previous | Next |
| ERROR_DS_CANT_REPLACE_HIDDEN_REC | ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED |
ERROR_DS_BAD_HIERARCHY_FILE
The hierarchy file is invalid.
Windows assigns decimal 8425 and hexadecimal 0x000020E9 to ERROR_DS_BAD_HIERARCHY_FILE. For ERROR_DS_BAD_HIERARCHY_FILE, the decisive subject is the directory hierarchy file used by a legacy directory or address-book operation; the value alone does not reveal which object, server, file, session, or transition failed.
The native value for ERROR_DS_BAD_HIERARCHY_FILE is 8425 (0x000020E9). Preserve ERROR_DS_BAD_HIERARCHY_FILE immediately after the failing Windows call because later logging, cleanup, LDAP, RPC, or file operations can replace the last-error value.
Where this result appears
- For
ERROR_DS_BAD_HIERARCHY_FILE, processing the directory hierarchy file used by a legacy directory or address-book operation. - For
ERROR_DS_BAD_HIERARCHY_FILE, executing an LDAP, RPC, deployment, replication, or directory-management operation. - For
ERROR_DS_BAD_HIERARCHY_FILE, working against a specific domain controller whose replica and schema state affect the result. - For
ERROR_DS_BAD_HIERARCHY_FILE, translating extended directory diagnostics into a Win32 error for an application or administration tool.
State boundary to prove
ERROR_DS_BAD_HIERARCHY_FILE applies to the directory hierarchy file used by a legacy directory or address-book operation and does not by itself prove that the entire server, directory, disk, session, or application is unavailable. The state boundary to prove for ERROR_DS_BAD_HIERARCHY_FILE is whether the hierarchy file is syntactically valid and consistent with the expected directory structure. Use file path, size, and checksum, format or version header, and operation that produced the file as independent evidence. When evidence for ERROR_DS_BAD_HIERARCHY_FILE disagrees, preserve timestamps and investigate the transition instead of selecting the most convenient value.
Likely causes
- For
ERROR_DS_BAD_HIERARCHY_FILE, the file is truncated or corrupt. - For
ERROR_DS_BAD_HIERARCHY_FILE, the file belongs to another version or environment. - For
ERROR_DS_BAD_HIERARCHY_FILE, manual editing broke its format. - For
ERROR_DS_BAD_HIERARCHY_FILE, storage or transfer changed its contents.
Diagnostic sequence
- For
ERROR_DS_BAD_HIERARCHY_FILE, capture error 8425 immediately at the API boundary and record the operation that was attempted. - For
ERROR_DS_BAD_HIERARCHY_FILE, identify the exact owner of the directory hierarchy file used by a legacy directory or address-book operation, including object generation, server, path, session, replica, or client context. - For
ERROR_DS_BAD_HIERARCHY_FILE, collect file path, size, and checksum before restarting a service or changing configuration. - For
ERROR_DS_BAD_HIERARCHY_FILE, compare format or version header with the documented or observed precondition. - For
ERROR_DS_BAD_HIERARCHY_FILE, correlate operation that produced the file with the Directory Service event log, LDAP extended diagnostics, replication metadata, dcdiag and repadmin output, and the calling application’s request trace. - For
ERROR_DS_BAD_HIERARCHY_FILE, determine whether side effects occurred and verify recovery after changing one responsible condition.
Evidence to collect
- For
ERROR_DS_BAD_HIERARCHY_FILE, file path, size, and checksum. - For
ERROR_DS_BAD_HIERARCHY_FILE, format or version header. - For
ERROR_DS_BAD_HIERARCHY_FILE, operation that produced the file. - For
ERROR_DS_BAD_HIERARCHY_FILE, related Directory Service events.
Correlate ERROR_DS_BAD_HIERARCHY_FILE with the Directory Service event log, LDAP extended diagnostics, replication metadata, dcdiag and repadmin output, and the calling application’s request trace. Keep the first detailed status even when a later wrapper translates it to error 8425; the first status often distinguishes transport, authorization, storage, schema, state, and application-integrity causes that share the same final Win32 result.
Handling, retry, and recovery
For ERROR_DS_BAD_HIERARCHY_FILE, the recovery objective is to regenerate the hierarchy file from authoritative directory data or restore a matching copy; do not repair unknown structure by guesswork.
Retry ERROR_DS_BAD_HIERARCHY_FILE only after the recorded condition changes and completion state is known. For ERROR_DS_BAD_HIERARCHY_FILE, idempotent queries may be repeated after recovery, but mutations require a state check first; backoff cannot repair malformed input, corruption, missing structure, or policy rejection.
Telemetry and support fields
- For
ERROR_DS_BAD_HIERARCHY_FILE, recordds_bad_hierarchy_file_apifor the producing function or management operation. - For
ERROR_DS_BAD_HIERARCHY_FILE, recordds_bad_hierarchy_file_targetfor the file, log, session, replica, object, or server identity. - For
ERROR_DS_BAD_HIERARCHY_FILE, recordds_bad_hierarchy_file_state_beforeandds_bad_hierarchy_file_requested_transition. - For
ERROR_DS_BAD_HIERARCHY_FILE, recordds_bad_hierarchy_file_first_statusfor the earliest lower-level diagnostic.
For support escalation involving ERROR_DS_BAD_HIERARCHY_FILE, retain decimal 8425, hexadecimal 0x000020E9, the API, UTC time, target identity, and first subsystem-specific status. For ERROR_DS_BAD_HIERARCHY_FILE, include the smallest reproducible request and evidence that distinguishes this condition from nearby codes. In the context of ERROR_DS_BAD_HIERARCHY_FILE, many ds codes are internal or management-facing and are not tied to one public function. the producing ldap, rpc, deployment, or management api must therefore be recorded with the code.
Difference from nearby results
For ERROR_DS_BAD_HIERARCHY_FILE, ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED occurs while constructing the in-memory table, whereas this code identifies an invalid input file
Practical validation scenario
A migration imports a hierarchy file copied in text mode and line endings or bytes are altered. Regenerating it in the supported binary path resolves parsing. The negative test should preserve the responsible condition and reproduce ERROR_DS_BAD_HIERARCHY_FILE; the recovery test should change only the identified cause, repeat the same operation, and verify both success and the absence of an unintended partial side effect.
Developer and administrator guidance
Administrators handling ERROR_DS_BAD_HIERARCHY_FILE should preserve Directory Service events, replication metadata, and the contacted domain controller before changing objects or forcing role transitions. For ERROR_DS_BAD_HIERARCHY_FILE, developers should retain LDAP extended diagnostics and object identities across wrappers so the Win32 code does not erase the actionable directory result. Code that exposes ERROR_DS_BAD_HIERARCHY_FILE through RPC, JSON, REST, PowerShell, or another protocol should preserve the Win32 domain, decimal 8425, hexadecimal 0x000020E9, and original component diagnostic.
References
- Microsoft: Win32 system error range containing this code — official context relevant to
ERROR_DS_BAD_HIERARCHY_FILE. - Microsoft: AD DS troubleshooting — official context relevant to
ERROR_DS_BAD_HIERARCHY_FILE. - Microsoft: repadmin — official context relevant to
ERROR_DS_BAD_HIERARCHY_FILE. - Microsoft: dcdiag — official context relevant to
ERROR_DS_BAD_HIERARCHY_FILE. - Microsoft: AD and LDS diagnostic event logging — official context relevant to
ERROR_DS_BAD_HIERARCHY_FILE.
Looking for a different code? Search another status or error code.