<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Facing issue in Microsoft SQL server MS-CDC. in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Facing-issue-in-Microsoft-SQL-server-MS-CDC/m-p/2442350#M10650</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/296034"&gt;@Tamil__&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I can't find any attachment in the post. If you performed DDL change (add column) and you got&amp;nbsp; following error message&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"The metadata for source table 'dbo.Users' is different than the corresponding MS-CDC Change Table."&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Most likely, the table structure of your source table dbo.Users does not align with SQL Server's Change Table (cdc.dbo.Users_CT), resulting in the suspension of your table.&lt;BR /&gt;&lt;BR /&gt;As mentioned above, you need to run sys.sp_cdc_disable_table and sys.sp_cdc_enable_table to rebuild SQL Server's change table.&lt;BR /&gt;&lt;BR /&gt;Please note that &lt;BR /&gt;1) Running&amp;nbsp;sys.sp_cdc_disable_table will drop SQL Server's Change Table. Make sure all changes are consumed by Replicate before applying DDL change. &lt;BR /&gt;2) Once DDL change is applied, make sure no activity on this table before rebuilding the change table. Otherwise, you may need to reload this table.&lt;BR /&gt;3) Make sure table structures of your target table and Replicate's store changes table align with the new structure before resuming the task.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Desmond&lt;/P&gt;</description>
    <pubDate>Thu, 18 Apr 2024 04:46:43 GMT</pubDate>
    <dc:creator>DesmondWOO</dc:creator>
    <dc:date>2024-04-18T04:46:43Z</dc:date>
    <item>
      <title>Facing issue in Microsoft SQL server MS-CDC.</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Facing-issue-in-Microsoft-SQL-server-MS-CDC/m-p/2442227#M10645</link>
      <description>&lt;P&gt;Source is SQL MS-CDC, we created full load + CDC task and perform DDL operation(add column) and Qlik replicate is captured that one.&lt;/P&gt;
&lt;P&gt;Same operation we created when task in stopped state. Then we resumed the task, &amp;nbsp;then table got suspended.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We tried to reload the table and task, while inserting a data in source and table got suspended. In that scenario, how should we run the task?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 00:45:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Facing-issue-in-Microsoft-SQL-server-MS-CDC/m-p/2442227#M10645</guid>
      <dc:creator>Tamil__</dc:creator>
      <dc:date>2024-04-18T00:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Facing issue in Microsoft SQL server MS-CDC.</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Facing-issue-in-Microsoft-SQL-server-MS-CDC/m-p/2442329#M10649</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/296034"&gt;@Tamil__&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thank you for reaching out to the Qlik community.&lt;BR /&gt;&lt;BR /&gt;We could see that you are getting below warning message.&lt;BR /&gt;++++++++++++++++++++++++++++++++++++++&lt;BR /&gt;00018352: 2024-04-17T13:48:27 [SOURCE_CAPTURE ]W: The metadata for source table 'dbo.Users' is different than the corresponding MS-CDC Change Table. The table will be suspended.&lt;BR /&gt;++++++++++++++++++++++++++++++++++&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;This is because the base table and the CDC table on MS-CDC have change .&lt;/P&gt;
&lt;P&gt;Please follow the below steps:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Truncation&lt;BR /&gt;1. stop the task&lt;BR /&gt;2. disable cdc for table&lt;BR /&gt;example below :&lt;BR /&gt;exec sys.sp_cdc_disable_table &lt;BR /&gt;@source_schema = 'dbo_schema', @source_name = 'EMPLOYEE2_table', @capture_instance = 'all'&lt;BR /&gt;3. do truncation on source&lt;BR /&gt;4. do truncation on target (or do a reload of table after task resume)&lt;BR /&gt;5. resume task&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DDL Change Handling&lt;BR /&gt;1. do the alter table&lt;BR /&gt;2. stop the task&lt;BR /&gt;3. disable ms-cdc for table&lt;BR /&gt;example below:&lt;BR /&gt;exec sys.sp_cdc_disable_table &lt;BR /&gt;@source_schema = 'dbo_schema', @source_name = 'EMPLOYEE2_table', @capture_instance = 'all'&lt;BR /&gt;4. resume task&lt;BR /&gt;5. unsuspend table or reload the table&lt;BR /&gt;- NOTE: Only the first DDL change will be picked up, will need to follow 'Truncation' steps if a DDL change is done while the table is suspended.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternate DDL Change Handling&lt;BR /&gt;1. stop task&lt;BR /&gt;2. disable ms-cdc for table&lt;BR /&gt;exec sys.sp_cdc_disable_table &lt;BR /&gt;@source_schema = 'dbo_schema', @source_name = 'EMPLOYEE2_table', @capture_instance = 'all'&lt;BR /&gt;3. modify source table&lt;BR /&gt;4. modify target table&lt;BR /&gt;5. start task with metadata only run (Create missing tables and then stop) – this will refresh the internal metadata without losing position&lt;BR /&gt;6. enable ms-cdc for table (if task is not set to do it automatically)&lt;BR /&gt;7. resume task&lt;BR /&gt;===&lt;BR /&gt;===&lt;BR /&gt;notes, if customer have multiple tables and want to disable all , is better to disable the cdc database.&lt;BR /&gt;example to disable:&lt;BR /&gt;exec demo_s_database.sys.sp_cdc_disable_db;&lt;/P&gt;
&lt;P&gt;example to enable:&lt;BR /&gt;exec demo_s.dbo.sp_cdc_enable_db;&lt;/P&gt;
&lt;P&gt;====&lt;BR /&gt;NOTES on older 2014 SQL server ,this issue could happen. &lt;BR /&gt;customer can do :&lt;BR /&gt;1. Upgrade you sql server to latest version&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;2. Add a new column to each cdc table as below&lt;/P&gt;
&lt;P&gt;a. example: Alter table table_cdc&lt;BR /&gt;Add [__$command_id] int&lt;/P&gt;
&lt;P&gt;b. unsuspend all the tables&lt;/P&gt;
&lt;P&gt;c. Uncheck the capture ddl events in advance table of the source ms-cdc , and save.&lt;/P&gt;
&lt;P&gt;d. reload the task&lt;/P&gt;
&lt;P&gt;e. task picked up&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;/P&gt;
&lt;P&gt;Sachin B&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 00:48:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Facing-issue-in-Microsoft-SQL-server-MS-CDC/m-p/2442329#M10649</guid>
      <dc:creator>SachinB</dc:creator>
      <dc:date>2024-04-18T00:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Facing issue in Microsoft SQL server MS-CDC.</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Facing-issue-in-Microsoft-SQL-server-MS-CDC/m-p/2442350#M10650</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/296034"&gt;@Tamil__&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I can't find any attachment in the post. If you performed DDL change (add column) and you got&amp;nbsp; following error message&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"The metadata for source table 'dbo.Users' is different than the corresponding MS-CDC Change Table."&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Most likely, the table structure of your source table dbo.Users does not align with SQL Server's Change Table (cdc.dbo.Users_CT), resulting in the suspension of your table.&lt;BR /&gt;&lt;BR /&gt;As mentioned above, you need to run sys.sp_cdc_disable_table and sys.sp_cdc_enable_table to rebuild SQL Server's change table.&lt;BR /&gt;&lt;BR /&gt;Please note that &lt;BR /&gt;1) Running&amp;nbsp;sys.sp_cdc_disable_table will drop SQL Server's Change Table. Make sure all changes are consumed by Replicate before applying DDL change. &lt;BR /&gt;2) Once DDL change is applied, make sure no activity on this table before rebuilding the change table. Otherwise, you may need to reload this table.&lt;BR /&gt;3) Make sure table structures of your target table and Replicate's store changes table align with the new structure before resuming the task.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Desmond&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 04:46:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Facing-issue-in-Microsoft-SQL-server-MS-CDC/m-p/2442350#M10650</guid>
      <dc:creator>DesmondWOO</dc:creator>
      <dc:date>2024-04-18T04:46:43Z</dc:date>
    </item>
  </channel>
</rss>

