Hi @Imran pyarali ,
You also need to add the Capture and Cleanup jobs using the following commands in the appropriate database. A capture job is used to populate the database change table and a cleanup job is responsible for a change table cleanup. The capture and cleanup jobs are created when a replication is enabled for the first time and initiated change data capture for a table.
exec sys.sp_cdc_add_job 'capture'
GO
exec sys.sp_cdc_add_job 'cleanup'
GO
For more information, please read this article: Restoring Database with CDC Enabled.
BTW, the latest Cumulative Update for SQL Server 2017 is CU28. Although this is not the point, there is always nothing wrong with installing the latest CU.
Best regards,
Seeya
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.