<@U04S8PLJWMT>. i am using an airbyte connection, ...
# replication-ask-ai
a
@kapa.ai. i am using an airbyte connection, the connection have 11 tables with cdc enabled in the sql server and the inital snapshot was completed, but now cdc for only one table is propagating, the cdc events for other is not as it is saying error caused during snapshoting a table but the snapshot was already taken.
k
Based on the knowledge sources, I can offer some relevant guidance for your situation, though the exact error you're describing isn't fully detailed in the available documentation. Possible Causes & Steps to Investigate 1. Schema/Column Changes After Initial Snapshot If any columns were added to the affected tables after the initial snapshot, CDC may not be tracking them properly. For MSSQL specifically, adding new columns via
ALTER TABLE
does not automatically get captured by CDC. [MSSQL Troubleshooting] To fix this for each affected table, you would need to disable and re-enable CDC:
Copy code
-- Step 1: Disable CDC on the table
EXEC sys.sp_cdc_disable_table  
    @source_schema = N'<schema>',  
    @source_name   = N'<table>',  
    @capture_instance = N'<capture instance (typically schema_table)>'  

-- Step 2: Re-enable CDC on the table
EXEC sys.sp_cdc_enable_table  
    @source_schema = N'<schema>',  
    @source_name   = N'<table>',  
    @role_name     = NULL  

-- Step 3 (Optional): Validate captured columns
EXEC sys.sp_cdc_get_captured_columns   
    @capture_instance = N'<capture instance (typically schema_table)>';
2. New Tables/Schemas Added After Initial Snapshot If new tables were added to the sync after the initial snapshot, a refresh is required. Newly created tables cause the CDC snapshot to be ahead of what Airbyte has in the connection state. [CDC Limitations] To resolve: 1. Go to the Schema section and look for a Schema changes detected notice. 2. Review and approve the new changes. 3. Enable the newly added schema(s)/column(s). 4. On the Status page, click the three dots (⋮) next to the affected stream and choose Refresh Stream. 3. Recommended Best Practice To avoid unintentional sync issues going forward, enable "Approve all schema changes myself" under Detect and propagate schema changes in the Settings section. This prevents newly detected changes from being included in the sync without a proper snapshot. [CDC Limitations] Note: The knowledge sources do not contain enough detail to pinpoint the exact cause of your specific error message ("error caused during snapshotting a table"). I'd recommend checking the full sync logs for more details and potentially reaching out to Airbyte support with the complete log output for further diagnosis. 👍 0 button 👎 0 button â„šī¸ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.