re synchronize tables after disabling cdc

NeophyteSQL 241 Reputation points
2020-09-09T16:15:55.973+00:00

disabled cdc on a database that had tables enabled for cdc.

enabled the cdc back on the table and database, but tables not in sync

how to re sync the tables

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,948 questions
0 comments No comments
{count} votes

Accepted answer
  1. Cris Zhan-MSFT 6,631 Reputation points
    2020-09-10T06:23:02.007+00:00

    Hi @sqlniks-7244,

    >how to re sync the tables

    I'm afraid there is no way to achieve this.

    Disable CDC for a database will disable CDC for all tables in the database, and remove all associated CDC metadata and system objects( jobs, change tables, stored procedures). The transaction log will no longer retain data changes for the CDC capture process, you cannot capture the data changes.
    https://video2.skills-academy.com/zh-cn/sql/relational-databases/track-changes/about-change-data-capture-sql-server?view=sql-server-ver15.


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Guoxiong 8,206 Reputation points
    2020-09-09T21:09:11.113+00:00

    Since you disabled CDC on the database, the change data capture jobs were automatically removed. I do not think you can capture the changes during the period of the time between Disabling and Enabling CDC.

    0 comments No comments

Your answer

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