I am getting the following error with the Airbyte ...
# ask-ai
a
I am getting the following error with the Airbyte Sql Server source connector:
Copy code
"failureOrigin" : "source",
  "failureType" : "config_error",
  "internalMessage" : "io.airbyte.commons.exceptions.ConfigErrorException: Saved offset no longer present on the server. Please reset the connection, and then increase binlog retention and/or increase sync frequency.",
  "externalMessage" : "Saved offset no longer present on the server. Please reset the connection, and then increase binlog retention and/or increase sync frequency.",
  "metadata" : {
    "attemptNumber" : 0,
    "jobId" : 15078,
    "from_trace_message" : true,
    "connector_command" : "read"
  },
  "stacktrace" : "io.airbyte.commons.exceptions.ConfigErrorException: Saved offset no longer present on the server. Please reset the connection, and then increase binlog retention and/or increase sync frequency.\n\tat io.airbyte.integrations.source.mssql.initialsync.MssqlInitialReadUtil.isSavedOffsetStillPresentOnServer(MssqlInitialReadUtil.java:155)\n\tat io.airbyte.integrations.source.mssql.initialsync.MssqlInitialReadUtil.getMssqlInitialLoadGlobalStateManager(MssqlInitialReadUtil.java:168)\n\tat io.airbyte.integrations.source.mssql.MssqlSource.initializeForStateManager(MssqlSource.java:638)\n\tat io.airbyte.integrations.source.mssql.MssqlSource.initializeForStateManager(MssqlSource.java:79)\n\tat io.airbyte.cdk.integrations.source.relationaldb.AbstractDbSource.read(AbstractDbSource.kt:158)\n\tat io.airbyte.cdk.integrations.base.ssh.SshWrappedSource.read(SshWrappedSource.kt:69)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.readSerial(IntegrationRunner.kt:333)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.kt:184)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.run(IntegrationRunner.kt:116)\n\tat io.airbyte.integrations.source.mssql.MssqlSource.main(MssqlSource.java:618)\n",
  "timestamp" : 1730027410603
u
This error is related to the Airbyte SQL Server source connector using Change Data Capture (CDC) for data synchronization. The error occurs when the saved offset (the point from which Airbyte last synced data) is no longer available on the SQL Server due to the retention period of CDC data being exceeded. To resolve this issue, you need to take the following steps: 1. Reset the connection in Airbyte. 2. Increase the retention period for CDC data in your SQL Server. By default, SQL Server only retains CDC data for three days. It's recommended to increase this retention period to prevent this error from occurring in the future. Here's how you can increase the retention period [as per the Airbyte documentation](https://docs.airbyte.com/integrations/sources/mssql#4-extend-the-retention-period-of-cdc-data):
Copy code
sql -- Set retention to 14400 minutes (10 days) EXEC sp_cdc_change_job @job_type='cleanup', @retention = 14400  -- Restart the cleanup job EXEC sys.sp_cdc_stop_job @job_type = 'cleanup'; EXEC sys.sp_cdc_start_job @job_type = 'cleanup';
3. Consider increasing the frequency of your Airbyte syncs to ensure they occur within the retention period. This issue has been reported by other users as well. For instance, in [this GitHub issue](https://github.com/airbytehq/airbyte/issues/42435), a user encountered a similar problem with the MSSQL source connector when using CDC for ingestion. If you continue to face issues after implementing these changes, you may need to perform a full refresh of your data to re-establish the initial snapshot and CDC tracking.