When Stitch replicates data from an Microsoft SQL Server-backed database, it will check for the required user permissions and database server settings. If permissions or server settings aren’t properly defined, you may receive an error during the Extraction phase of the replication process. These errors will surface in the integration’s Extraction Logs.


Microsoft SQL Server-backed databases

The errors and troubleshooting steps in this article are applicable to the following database integrations:


Extraction errors and troubleshooting

Below are the errors you might see if Stitch has trouble replicating data from an Microsoft SQL Server-backed database, as well as how to resolve them.

Meaning

Change Tracking is not enabled for the named database.


Troubleshooting

Enabled Change Tracking for the database referenced in the error message. To use Change Tracking, you must enabled it both at the database and table level.

To enable Change Tracking for the database, log into your database and run the following statement, replacing <database_name> with the name of the database:

ALTER DATABASE <database_name>  
SET CHANGE_TRACKING = ON  
(CHANGE_RETENTION = 3 DAYS, AUTO_CLEANUP = ON)
Meaning

Change tracking is not enabled for the named table.


Troubleshooting

Enable change tracking for the table referenced in the error message. To use Change Tracking, you must enabled it both at the database and table level. Microsoft SQL Server requires that Change Tracking be enabled for every table you want to use Log-based Incremental for.

To enable Change Tracking for the table, log into your database and run the following statement, replacing <schema_name>.<table_name> with the names of the schema and table:

ALTER TABLE <schema_name>.<table_name>  
ENABLE CHANGE_TRACKING  
WITH (TRACK_COLUMNS_UPDATED = ON)

Run the statement for every table you want to replicate using Log-based Incremental Replication.


Questions? Feedback?

Did this article help? If you have questions or feedback, feel free to submit a pull request with your suggestions, open an issue on GitHub, or reach out to us.