| Previous | Next |
| XACT_E_TRANSACTIONCLOSED | XACT_E_REPLAYREQUEST |
XACT_E_INVALIDLSN
XACT_E_INVALIDLSN is the failure HRESULT 0x8004D084 (signed decimal -2147168124, unsigned decimal 2147799172). Its severity bit is 1, facility is 4 (FACILITY_ITF), and the facility-specific code field is 0xD084.
The recovery operation references an invalid log sequence number
The SDK message contains only the symbolic name and groups this range with TXF and CRM errors. An LSN is a log address that is valid within a particular log stream; Microsoft notes that LSNs are stream-specific and cannot be compared across different streams.
AllStat records the Windows message as: “XACT_E_INVALIDLSN” This text should be interpreted at the transaction stage described below rather than as a generic COM failure.
The contract boundary to identify
The constant does not publicly define which logging implementation returned it. The safe diagnostic focus is the supplied sequence number, its originating stream, generation, and the operation that tried to read, flush, truncate, or replay around it.
Likely causes to separate
- An LSN from one log stream or generation is used with another clerk or log object.
- The referenced record was truncated, forgotten, or never made durable.
- Serialization truncates or corrupts the sequence-number value.
- Recovery metadata survives a log reset or component reinstall and points outside the current stream.
Evidence worth preserving
- Record the exact returning interface, LSN value, log identity, stream generation, and transaction UOW.
- Capture where the LSN was originally returned and whether the corresponding record was flushed.
- Preserve log truncation, cleanup, restore, and failover events.
- Compare values only within the same documented stream; cross-stream ordering is meaningless.
Diagnostic sequence
- Trace the LSN back to its creation and verify that the caller retained the matching log object and generation.
- Check width, byte order, persistence format, and sentinel handling in application metadata.
- Determine whether supported cleanup legitimately invalidated the referenced record.
- Do not scan or modify the durable log manually in an attempt to manufacture a valid address.
Retry and recovery
Rebuild the reference from authoritative current log state or follow the component’s supported recovery procedure. If the missing record affects an incomplete transaction, preserve the log and escalate rather than skipping the record.
What this HRESULT does not establish
The HRESULT does not prove physical disk corruption. It also does not say that every log record is invalid; the fault can be a single stale or cross-stream address.
Difference from nearby transaction results
XACT_E_REPLAYREQUEST concerns a replay-related request, while this result identifies the supplied log position. XACT_E_TRANSACTIONCLOSED concerns lifecycle rather than address validity.
Practical scenario
A recovery tool persists an LSN without the log-generation identifier. After a log is recreated, the tool submits the old number to the new stream and receives this HRESULT. The persistence format is changed to bind each LSN to its stream identity and generation.
Guidance for software and telemetry
Never log only the numeric LSN. Include log identity and generation, and treat an invalid address as a recovery-integrity event rather than an ordinary transient retry.
Official Microsoft references
- Microsoft: COM transaction error codes
- Microsoft: HRESULT values in MS-ERREF
- Microsoft: ILog transaction logging interface
- Microsoft: log sequence numbers
- Microsoft: ICrmLogControl
Looking for a different code? Search another status or error code.
