Msg 22995 Level 16 State 1 Procedure sp_cdc_change_job_internal Line – SQLSERVERLEARNER https://sqlserverlearner.com LEARN SQL SERVER ONLINE Tue, 22 Oct 2013 10:12:31 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.2 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. https://sqlserverlearner.com/2013/10/22/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/ https://sqlserverlearner.com/2013/10/22/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/#respond Tue, 22 Oct 2013 10:12:31 +0000 https://sqlserverlearner.azurewebsites.net/2013/10/22/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/ 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]

]]>
https://sqlserverlearner.com/2013/10/22/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/feed/ 0