Transactional replication and CDC

  • I had both of these running on a database and had issues with the log file growing and never releasing (this has been running for months with no issues). Log_reuse_wait_desc shows 'replication'. Replication showed no latency (log reader or distribution agent). I didn't have any errors in replication or CDC. I disabled CDC at the database level. I then removed replication completely.

    I have now recreated my publication and subscription and the issue is occurring again. I have NOT re-enabled CDC. However, the sys.dm_cdc_log_scan_sessions view is still being populated with current entries. Is there some CDC piece that didn't clean up properly? Another step I may need to take? I have verified that none of the CDC system tables exist and the cleanup job was deleted (there was no create job since replication log reader already existed).

    When I run dbcc opentran on this database, I see the oldest non-distributed LSN and it is not updating.

    Any advice or help is appreciated.

    Thanks,
    Kim

  • ktalley.dba - Wednesday, January 23, 2019 2:51 PM

    I had both of these running on a database and had issues with the log file growing and never releasing (this has been running for months with no issues). Log_reuse_wait_desc shows 'replication'. Replication showed no latency (log reader or distribution agent). I didn't have any errors in replication or CDC. I disabled CDC at the database level. I then removed replication completely.

    I have now recreated my publication and subscription and the issue is occurring again. I have NOT re-enabled CDC. However, the sys.dm_cdc_log_scan_sessions view is still being populated with current entries. Is there some CDC piece that didn't clean up properly? Another step I may need to take? I have verified that none of the CDC system tables exist and the cleanup job was deleted (there was no create job since replication log reader already existed).

    When I run dbcc opentran on this database, I see the oldest non-distributed LSN and it is not updating.

    Any advice or help is appreciated.

    Thanks,
    Kim

    sys.dm_cdc_log_scan_sessions is populated by the cdc capture job. It is created even if you have a replication log reader agent job from having replication. They use some of the same components but the jobs are different. So cdc would have the cleanup job and the capture job. cdc would need to be enabled in the database for sys.sp_cdc_help_jobs to work and display the cdc jobs for the database. Try executing the following in msdb to see if you can find the job:
    SELECT j.*
    FROM dbo.sysjobs j
    INNER JOIN dbo.sysjobsteps js
    ON j.job_id = js.job_id
    WHERE js.command like '%sys.sp_MScdc_capture_job%'

    Sue

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply