SQL Server CDC Clean Job Is not Deleting Rows

t0ybt7op  于 2023-05-05  发布在  其他
关注(0)|答案(1)|浏览(205)

In my CDC table. I have,

__$start_lsn         __$end_lsn        __$seqval     __$operation   __$update_mask
0x0000004600002EF40004  NULL    0x0000004600002EF40003  3             0x08
0x0000004600002EF40004  NULL    0x0000004600002EF40003  4             0x08

In my msdb.dbo.cdc_jobs

database_id job_type job_id maxtrans    maxscans    continuous  pollinginterval retention   threshold
9           capture   xxx        500     10           1              5              0        0
9           cleanup   xx          0      0             0             0             4320   5000

select sys.Fn_cdc_map_lsn_to_time(0x0000004600002EF40004) returns 2023-04-08 11:23:25.467

Retention is 3 days. Cleanup agent job is running sys.sp_MScdc_cleanup_job daily. Why there are still rows in my CDC table as I am thinking after 3 days retention these old rows should be deleted?

相关问题