Recently one of the customer reported a missing LSN issue with the below error:
[SOURCE_CAPTURE ]E: LSN '000c6d7d:00000029:0001' could not be found, neither in the transaction log nor in the backup log
We started debugging entire Replicate logs and SQL server logs. Then we found the below issue within the customer environment.
Error message from Replicate log:
00007900: 2022-04-25T08:21:14 [SOURCE_CAPTURE ]I: Executing 'exec sp_repldone 0x,0x000c6cd700000dff0004,-1,0' is not applicable due to 'Native code #9003' transient state and therefore ignored. (sqlserver_log_truncation_safeguard.c:700)
Error message from SQL Server log:
04/25/2022 08:21:14,spid66,Unknown,The log scan number (xxxxx:xxxx:x) passed to log scan in database 'PROLOGUE' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication<c/> re-create the publication. Otherwise<c/> restore from backup if the problem results in a failure during startup.