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

[sql]
EXEC sp_cdc_change_job @job_type=’capture’,@maxtrans = ‘10000’,@retention=200
[/sql]

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.

Resolution:

Remove @retention input parameter.

[sql]
EXEC sp_cdc_change_job @job_type=’capture’,@maxtrans = ‘10000’
[/sql]

Leave a Reply

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