The Parameter @retention should NOT be supplied with a NOT NULL value when the value of @job_type is ‘capture’

EXEC sp_cdc_change_job @job_type=’capture’,@maxtrans = ‘10000’,@retention=200

The above code gives the below error.

Msg 22995, Level 16, State 1, Procedure sp_cdc_change_job_internal, Line 39
A value for the parameter @retention cannot be specified when the job type is ‘capture’. Specify NULL for the parameter, or omit the parameter from the statement.


Remove @retention input parameter.

EXEC sp_cdc_change_job @job_type=’capture’,@maxtrans = ‘10000’

Leave a Reply

Your email address will not be published. Required fields are marked *