Error with SQL Server CDC replication mode Incremental | Append + Deduped

Summary

The user is facing an error with the SQL Server CDC connector while using the replication mode Incremental | Append + Deduped. The error message indicates an insufficient number of arguments supplied for the function cdc.fn_cdc_get_all_changes. The command runs fine in the source database. Seeking pointers on what could have gone wrong.


Question

Hi, I’m trying to extract data from SQL Server db using the CDC option. The replication mode is set to Incremental | Append + Deduped. The job had been running fine for a few days, but now it has started failing with this error -

        at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:265) ~[mssql-jdbc-10.2.1.jre8.jar:?]```
When I run the same cdc.fn_cdc_get_all_changes command in the source database, it runs fine and returns all changed records. Any pointers on what could have gone wrong?

<br>

---

This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here](https://airbytehq.slack.com/archives/C021JANJ6TY/p1714026162231369) if you want to access the original thread.

[Join the conversation on Slack](https://slack.airbyte.com)

<sub>
["sql-server", "cdc", "incremental-append-deduped", "error", "insufficient-arguments"]
</sub>

<@U06KPKLUK26> what version of SQL server connector are you running. Can you share the complete sync log?
I found this <sql server - An insufficient number of arguments were supplied for the procedure or function cdc.fn_cdc_get_all_changes_ - Stack Overflow Overflow> discussion related to the stack trace error you shared.

<@U01MMSDJGC9> I have tried with the latest version 4.0.19 and still facing this error. The source db I’m connecting to is SQL Server 2016. Is this error due to any version compatibility issues ?