Share via

Azure Data Sync Failure

Aaron Wong 40 Reputation points
2026-04-05T18:16:24.84+00:00

We are facing issue in Azure Data Sync in one of our data sync groups. The sync group had 13 tables that were syncing from the Hub (Azure SQL DB) to the member DB(SQL On-Prem DB) on the client side. We removed a table "RMBS_US_Collat_Detail_Latest_Custom" from the sync group, ran the attached script and removed any residual sync objects for that table. The same script was run by the client and the sync objects and the table itself was dropped so that we could do the schema changes and readd the table back to the sync group. When readding the table , after the schema changes, we are getting the following error on the sync group, even though the table is not added back now. We are just syncing the group to make sure the remaining tables sync successfully, before adding the removed table back again. The Hub and Member DB schema has been refreshed in the syncgroup, made sure there are no sync objects left for the removed table using the script provided by Microsoft support earlier. Still, we keep getting the same error. The sync group itself is not working now. Obviously, we can't remove all the client tables in the sync group again as it will impact their production environment. Please let us know how to fix the issue and proceed further.

Error: Sync failed with the exception "An unexpected exception occurred in a background thread that is enumerating changes. See the inner exception for more details.Inner exception: The stored procedure '[DataSync].[RMBS_US_Collat_Detail_Latest_Custom_dss_selectchanges_ee76f35b-6163-403e-9314-9ee72be12371]' doesn't exist. For more information, provide tracing ID ‘d86906ab-d606-4704-a467-bd22c60879aa’ to customer support."

Member DB.png

Remove DataSync Tables - RMBS_US_Collat_Detail_Latest_Custom.txt

Hub DB.png

Sync Error.png

Looking for your support as soon as possible.

Thanks!

Azure SQL Database

1 answer

Sort by: Most helpful
  1. Saraswathi Devadula 15,760 Reputation points Microsoft External Staff Moderator
    2026-04-06T14:40:29.23+00:00

    Hi **Aaron Wong,

    What happened**:

    From the symptoms you described, the sync group kept trying to enumerate changes for the removed table because Data Sync metadata still contained a reference to that table, even after the table was removed from the sync schema and the table-level DataSync objects were dropped. That is consistent with the behavior you observed: once you refreshed the schema and manually removed stale references in DataSync.scope_config_dss (the config_text field), the sync group was able to start again.

    In other words, this wasn’t caused by the remaining 12 tables themselves—rather, it was a metadata inconsistency / leftover reference that caused Data Sync to look for a procedure that had already been removed: [DataSync].[RMBS_US_Collat_Detail_Latest_Custom_dss_selectchanges_ee76f35b-6163-403e-9314-9ee72be12371].

    1) “Is this the right approach, or was there a better way to handle it?”

    Your overall approach is the right high-level approach: remove the table from the sync group, make schema changes, then add it back after schema refresh. However, the key improvement is to ensure the deprovision step completes cleanly before making changes and reintroducing the table.

    Recommended “best practice” sequence (to avoid orphaned metadata):

    Remove the table from the sync group in the portal.

    Deploy/save the sync group change and allow deprovisioning to finish (this step is important—removing and then immediately making additional edits without deploying can leave the portal and backend in an inconsistent state).

    Confirm the table is no longer part of the sync schema (and that DataSync artifacts for that table are gone on hub and member).

    Perform the schema change on both hub and member (Data Sync expects schema compatibility; failures to apply changes can lead to warnings/out-of-date states).

    Refresh schema in the sync group UI and then add the table back.

    About manually editing DataSync.scope_config_dss: it can resolve a stuck state (as you proved), but it’s generally better as a last resort because those are service-managed objects. The preferred path is clean deprovision + schema refresh + redeploy (and if needed, remove/re-add the member endpoint).

    2) “Can we add the deleted table into another sync group to get it ASAP?”

    Yes—this can be a good way to accelerate delivery as long as there is no overlap.

    Important constraint: Data Sync does not handle circular references, and specifically:

    “Any row that is synced by one sync group can’t be synced by another sync group.”

    So the safe design is:

    Keep Sync Group A running the existing 12 tables.

    Create Sync Group B with only RMBS_US_Collat_Detail_Latest_Custom (and any strictly required dependent tables).

    Ensure that this table is not included in both groups at the same time.

    This avoids the “same row in multiple groups” scenario that Data Sync explicitly warns against.

    3) “If we run two sync groups in parallel, will server resources be impacted? Will tempdb be a problem?”

    Running sync groups in parallel will increase workload on:

    the hub database,

    the member database, and

    the sync metadata database (which Data Sync uses continuously and “runs a frequent workload”).

    So yes, you should expect higher CPU/IO/log usage during parallel sync. Whether tempdb becomes a bottleneck depends on the workload pattern (volume of DML changes, size of tracking tables, and concurrent user workload). Data Sync does add system-created tracking tables and stored procedures under the DataSync schema, and overall overhead scales with table width and traffic.

    Practical guidance:

    If your primary goal is “get the removed table to the member ASAP,” make Sync Group B one-directional (Hub → Member) if business allows—this reduces conflict processing and can reduce overall churn.

    Monitor CPU, log write %, and tempdb utilization during the parallel run, and throttle by increasing sync interval if needed.

    4) “Can we increase the DTU size for the server/pool while sync is happening, without impacting the sync process?”

    You can scale Azure SQL Database / Elastic Pool resources while sync is running, but you should plan for a brief connectivity interruption at switchover:

    Azure SQL “enables you to dynamically add more resources … with minimal downtime; however, there is a switchover period where connectivity is lost … which can be mitigated using retry logic.”

    So, the safest expectation to set is:

    Scaling is supported and commonly used to mitigate resource pressure,

    but the sync agent/job may need to retry if it hits the brief reconnect window.

    Also note: if you encounter schema refresh timeouts, Microsoft explicitly recommends considering scaling up the sync metadata database SKU, because lower SKU can time out on schema refresh for complex schemas.

    5) “For future datatype changes / adding columns on a synced table, what is the best approach? Is removing table + clearing objects + deleting client table OK?”

    Best practice is to treat schema changes as a planned change process, because Data Sync is primarily a data sync mechanism and schema incompatibilities can break propagation (leading to warning/out-of-date states if not addressed).

    Recommended approach for schema changes on an already-synced table:

    Remove the table from the sync group and deploy the change (wait for deprovision to complete).

    Apply schema changes on both hub and member.

    Refresh schema in the sync group UI.

    Add the table back and allow initial sync for that table to reinitialize.

    Deleting the member-side table can be acceptable if your intention is to fully re-seed it from the hub (Hub → Member), but it should be done carefully (maintenance window / controlled cutover), since it affects applications that read that table.

    A lower-risk alternative for large/high-importance tables:

    Create a new “v2” table name, sync it, validate, then do a controlled application cutover (rename/switch in a short window). This reduces risk to the ongoing sync group and avoids prolonged downtime for consumers.

    Kindly please check and let us know the update.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.