How the cdc retention value can be changed for the cleanup job?

前端 未结 3 1085
野的像风
野的像风 2021-02-13 10:46

I\'m implementing a logging feature on a asp.net mvc2 application, that uses SqlServer2008 as a database and Entity Framework as a data model.

I enabled CDC feature of S

3条回答
  •  無奈伤痛
    2021-02-13 10:50

    I just discovered that the default retention value is 4320 minutes = 72 hours = 3 days.

    It should be configurable by using

    sp_cdc_change_job @job_type='cleanup', @retention=minutes
    

    The maximum value is 52494800 (100 years). If specified, the value must be a positive integer. Retention is valid only for cleanup jobs.

    Here's the link to the more detail explanation of sp_cdc_change_job procedure

    Hope this will help someone else, too :D.

提交回复
热议问题