| Previous | Next |
| hrInvalidRecips | hrRestoreMapExists |
hrCouldNotConnect
Interpretation in the backup state machine
hrCouldNotConnect means the backup client could not establish the required session with the selected server or running Directory Service.
The stored value is 0xC7FF0007 (facility-specific HRESULT). The legacy symbolic name comes from the Windows Directory Service backup/restore message header.
The first useful distinction is that hrCommunicationError means an established local backup exchange failed; this code can occur before a usable backup context exists. Start by recording the resolved server name, local/remote expectation, DsIsNTDSOnline result, RPC status, service state, credentials, and firewall path.
Start with these observations
- Code-specific observation: record the resolved server name, local/remote expectation, DsIsNTDSOnline result, RPC status, service state, credentials, and firewall path.
Objects and state involved
| Diagnostic layer | Directory Service state, RPC connectivity, authentication, and the HBC transport |
|---|---|
| Relevant API surface | DsIsNTDSOnline, DsSetAuthIdentity, DsBackupPrepare, and subsequent file transfer calls |
| Code-specific condition | the backup client could not establish the required session with the selected server or running Directory Service |
| Narrow corrective direction | restore service and RPC reachability, then create a new backup context rather than reusing the failed one |
The legacy API requires the directory service to be running for backup and offline for restore. Transport failure can invalidate the context and make partial file data unusable as a set.
Recovery or retry plan
- Record it,
0xC7FF0007, the API name, the current phase, and all live context or file owners. - Verify the condition by recording the resolved server name, local/remote expectation, DsIsNTDSOnline result, RPC status, service state, credentials, and firewall path.
- Apply only the targeted fix: restore service and RPC reachability, then create a new backup context rather than reusing the failed one.
Not the same as
It specifically means that hrCommunicationError means an established local backup exchange failed; this code can occur before a usable backup context exists. Related values below can appear in the same workflow but require a different response:
hrCommunicationError | the local backup protocol failed after the operation began exchanging control or file data |
|---|---|
hrNoFullRestore | an incremental restore was requested before a full backup had established the destination database baseline |
hrDatabaseAttached | the database was already attached to the instance when another attach operation was requested |
Actions that can make diagnosis worse
- Do not report a connectivity problem as database corruption.
- Do not resume in the middle of a file without a protocol guarantee.
Acceptance criteria for a fix
A useful regression test should force the condition “the backup client could not establish the required session with the selected server or running Directory Service”, call one documented API transition, and assert the exact HRESULT.
Technical references
- AD backup walkthrough — API ordering, file semantics, warning/error interpretation, or recovery behavior relevant to this HRESULT.
- DsBackupPrepare contract
- AD backup errors
Looking for a different code? Search another status or error code.
