When running a Qlik Replicate CDC task from the Microsoft SQL Server source endpoint, you may get the below error, but the task continues to run despite being marked as errored. This is because the error is considered a recoverable error and the task eventually resumes fine once it finds the LSN in the next run.
Resolution
Edit the MS-SQL source endpoint setting and add the internal parameter afterConnectScriptusing the Qlik Replicate GUI.
Go toManage Endpoint Connections
Open your MS-SQL source endpoint definition
Open theAdvanced tab
Go toInternal Parameters
Add the internal parameter: afterConnectScript and set it todbcc traceon(2537)
This traceon code will allow the session to read LSNs still in the online log but marked as replicated and inactive.
The Qlik Replicate user configured to read the MS-SQL must be a SYSADMIN
Possible Cause
A possible reason for this is that the task might be behind, and the online log is truncated, but the Replicate in the recovery attempt can find the LSN in the online/Active logs.