{"id":276,"date":"2013-10-22T10:12:31","date_gmt":"2013-10-22T10:12:31","guid":{"rendered":"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\/"},"modified":"2013-10-22T10:12:31","modified_gmt":"2013-10-22T10:12:31","slug":"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","status":"publish","type":"post","link":"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\/","title":{"rendered":"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."},"content":{"rendered":"
The Parameter @retention should NOT be supplied with a NOT NULL value when the value of @job_type is ‘capture’<\/p>\n
[sql]
\nEXEC sp_cdc_change_job @job_type=’capture’,@maxtrans = ‘10000’,@retention=200
\n[\/sql]<\/p>\n
The above code gives the below error.<\/p>\n
Resolution:<\/strong><\/p>\n Remove @retention input parameter.<\/p>\n [sql] 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…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2168,128],"tags":[2169,2170],"class_list":["post-276","post","type-post","status-publish","format-standard","hentry","category-change-data-capture","category-sql-errors","tag-msg-22995","tag-msg-22995-level-16-state-1-procedure-sp_cdc_change_job_internal-line"],"_links":{"self":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts\/276","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/comments?post=276"}],"version-history":[{"count":0,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts\/276\/revisions"}],"wp:attachment":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/media?parent=276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/categories?post=276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/tags?post=276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
\nMsg 22995, Level 16, State 1, Procedure sp_cdc_change_job_internal, Line 39
\nA 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.
\n<\/font><\/p>\n
\nEXEC sp_cdc_change_job @job_type=’capture’,@maxtrans = ‘10000’
\n[\/sql]<\/p>\n","protected":false},"excerpt":{"rendered":"