Forum Discussion

joel_delima's avatar
joel_delima
Regular Visitor
5 days ago

Fabric Copy Job CDC Error On Incremental Load

I'm using the fabric copy job to incrementally copy data from a CDC enabled table on SQL Server 2008 R2. The initial full load ran successfully, however all subsequent runs are failing and returning the following error:

Failure happened on 'Source' side. ErrorCode=SqlOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A database operation failed with the following error: 'Incorrect syntax near '.'.'

I'm assuming the error is caused by some dynamic sql script generated by the copy job in the backend. Does anyone know how I can determine what's actually causing this error, and how I can fix it?

For context, this error is happening on our production SQL Server 2008. I tested the same copy job on our dev SQL Server 2008 and had no issues whatsoever with the initial load and incremental runs. Both SQL Servers are identical.

5 Replies

  • v-csrikanth's avatar
    v-csrikanth
    Icon for Community Support rankCommunity Support

    Hi joel_delima​ 

    We would like to inquire whether have you got the chance to check the solutions provided by other users in community to resolve the issue. We hope the information provided helps to clear the query. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.

    • joel_delima's avatar
      joel_delima
      Regular Visitor

      Thank you, we've confirmed that this error is due to database compatibility level 80 on sql server 2008 R2. Fabric CDC Copy Job runs fine on compatibility levels above 80.

  • ShivekMaharaj's avatar
    ShivekMaharaj
    Icon for Community Champion rankCommunity Champion

    Hi joel_delima​,

    I would follow v-csrikanth​'s direction as well.

    One additional point is that the successful initial load and the failing CDC runs use different read paths. Microsoft documents that the first Copy Job run performs a full load, while subsequent CDC runs read the SQL Server change feed, so success of the initial load does not necessarily validate the CDC path.

    Microsoft currently lists on-premises SQL Server as a supported CDC source for Copy Job, but I do not see a published Fabric CDC support matrix that confirms behaviour for every historical SQL Server build.

    Because both of your servers are SQL Server 2008 R2, I would compare more than just the major version:

    • exact build / service pack level;
    • database compatibility level;
    • CDC capture instance metadata;
    • table schema and data types;
    • gateway version;
    • permissions used by the Copy Job connection.


    SQL Server 2008 R2 itself has been out of extended support for several years, so subtle differences between those two environments are worth checking.

    The most useful next step is still to capture the exact statement that fails on the production server. Once you have that SQL, it should be much easier to determine whether the syntax is coming from the generated CDC query or from something specific to the source environment.

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.

  • v-csrikanth's avatar
    v-csrikanth
    Icon for Community Support rankCommunity Support

    Hi joel_delima​

    The successful initial load confirms that Copy Job can read the table, but subsequent CDC runs use a different read path. The error alone doesn’t identify the failing SQL statement, so it isn’t enough to confirm a problem with the SQL generated by Copy Job.

    To isolate the cause:

    1. Capture the failing SQL on production. With your DBA’s approval, use SQL Server Profiler/SQL Trace for SQL Server 2008 R2. Filter narrowly to the Copy Job login and source database, and capture SQL:BatchStarting, RPC:Starting, Exception, and User Error Message, including SQL text and session ID. Run one incremental copy and stop the trace immediately afterward. This should help correlate the syntax error with the submitted statement.
    2. Compare the exact configurations—not just the server versions. Check engine builds/service packs, database compatibility levels, database/schema/table/column names, CDC capture instances, and Copy Job source settings and mappings. Differences in identifiers or CDC configuration are worth investigating, but shouldn’t be treated as the cause until the captured SQL confirms it.
    3. Base the fix on that statement. Have the DBA inspect the failing SQL, particularly identifier qualification and quoting around the reported .. Avoid renaming production objects or disabling/re-enabling CDC without a confirmed diagnosis. If the statement points to a generated-query issue, raise a Fabric Support case with the captured SQL, run/activity ID, and failure timestamp.

    Thank you.

    • joel_delima's avatar
      joel_delima
      Regular Visitor

      Thanks - I've run the copy job while monitoring the sql server profiler. The SQL the copy job generates runs fine in our dev server, but not in prod. We believe its the compatibility-level. Our dev server is on 90 while prod server is on 80, so our environments are not truly identical.