When running a Replicate task using MS SQL server as a source endpoint and the table is suspended with the following error:
00015156: 2021-06-09T12:05:42:413215 [TASK_MANAGER ]W: Table 'dbo'.'Test' (subtask 0 thread 0) is suspended. Failure in executing add article. (replicationtask.c:2567)
Troubleshooting Steps:
Set the logging component SOURCE_CAPTURE to VERBOSE level and get the statement that creates the article from the task log
Manually create the article on the source database
If you encounter an error saying that the article exists, then check the status of the article: Sample Error: Msg 14030, Level 16, State 1, Procedure sys.sp_MSrepl_addarticle, Line 1356 [Batch Start Line 0] The article 'AR_ARTICLE_00011_706101556' exists in publication 'AR_PUBLICATION_00011'.
Query to check for articles:
select a.name from sysarticles a,sysobjects o where a.[objid]=o.[id] and schema_name(o.[uid]) =N'<schemaname>' and object_name(a.[objid])=N'<tablename>' and a.[type] in(1,3,5,7) and a.status & 1 = 1
If the query did not return anything, run this:
select a.name , a.* , a. status &1 from sysarticles a,sysobjects o where a.[objid]=o.[id] and schema_name(o.[uid]) =N'<schemaname>' and object_name(a.[objid])=N'<tablename>' and a.[type] in(1,3,5,7)
If the article status is not active, then Replicate will try to recreate it.
If all articles exist then you can add and enable the internal parameter on the source endpoint > advanced tab: ignoreMsReplicationEnablement.
This will tell Replicate to no check for publication/articles.
Note: Internal parameters are parameters that are not exposed in the UI. Pleas reach out to Qlik Support if you need further assistance