<?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>article Qlik Replicate: Starting Log Stream Tasks with Timestamp in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Starting-Log-Stream-Tasks-with-Timestamp/ta-p/1879839</link>
    <description>&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Content:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-TOC indent="15" liststyle="none" maxheadinglevel="3"&gt;&lt;/LI-TOC&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Restart with a timestamp for both log stream staging (parent) and replication (child) tasks&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;Sometimes a log stream task pair will stop processing CDC data and you may need to restart the tasks with a timestamp in order to get the CDC flowing again.&lt;/P&gt;
&lt;P&gt;If you are going to restart a log stream task with a timestamp, the same timestamp must be used for each task, the staging task and the replication task.&lt;/P&gt;
&lt;P&gt;NOTE: If you start the staging task from a timestamp you must start all associated replication tasks with the same timestamp.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Restart with a timestamp for replication task only&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;If you want to just restart with a timestamp on the replication task and you do not know the correct time stamp you can find it following these 3 steps.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Restart the replication task with any timestamp you want - this will generate a log entry.&lt;/LI&gt;
&lt;LI&gt;Use the generated timestamp in the above log line "last source timestamp 1640589670000000" - this number should be converted using this link: &lt;A href="https://www.epochconverter.com/" target="_blank" rel="noopener"&gt;https://www.epochconverter.com/&lt;/A&gt; . This timestamp should then be adjust to the time zone of the Replicate console (if they differ).&lt;/LI&gt;
&lt;LI&gt;Use this timestamp to restart the replication task.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Configuration tips:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;For an Oracle source log stream task&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;What are the chances of data duplication if we start the staging task with a past SCN number?&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Answer:&lt;/STRONG&gt; Chances are good there will be issues. The following setting on Error Handling /&amp;nbsp;Apply Conflicts will mitigate them.&lt;BR /&gt;&lt;BR /&gt;In the Error Handling /&amp;nbsp;Apply Conflicts select Ignore record, for all 3 settings. Alternatively, if the target DB handles deletes okay you could set the above to Upsert / Merge mode.&lt;BR /&gt;&lt;BR /&gt;Reference:&amp;nbsp;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://community.qlik.com/t5/Knowledge/Qlik-Replicate-Implementing-UPSERT-and-MERGE-modes-by-applying-a/ta-p/1780009" target="_blank" rel="noopener"&gt;Qlik Replicate: Implementing UPSERT and MERGE modes by applying a Conflicts Handling Policy&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;There are a few options in apply conflicts policy, what exact options we should use to avoid data duplication after starting the parent task with the SCN number?&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Answer:&lt;/STRONG&gt; Replicate will process CDC again, events for inserts, deletes and updates will be replayed. The above apply conflicts will suffice.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;How do we get the exact SCN number from Oracle Source?&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Answer:&lt;/STRONG&gt; There are two options to get the correct timestamp:&lt;BR /&gt;&lt;BR /&gt;
&lt;OL class="lia-list-style-type-lower-alpha"&gt;
&lt;LI&gt;On the same line in the log file, from which the SCN was taken, you can see an indication of the equivalent source timestamp, for example - "last source timestamp 1640589670000000" - this number should be converted using this link: &lt;A style="font-family: inherit; background-color: #ffffff;" href="https://www.epochconverter.com/" target="_blank" rel="noopener"&gt;https://www.epochconverter.com/&lt;/A&gt;&lt;SPAN&gt; . This timestamp should then be adjusted to the time zone of the Qlik Replicate console (if they differ).&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Use Oracle command - &lt;FONT face="courier new,courier"&gt;SELECT SCN_TO_TIMESTAMP(ORA_SCN) FROM DUAL&lt;/FONT&gt;; instead of &lt;FONT face="courier new,courier"&gt;ORA_SCN&lt;/FONT&gt; put the SCN in decimal format, that was used for the LS task.&lt;BR /&gt;&lt;BR /&gt;The timestamp can be used for both the log stream staging and the replicate tasks (instead of using the SCN)&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-style: italic;"&gt;The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.&lt;/P&gt;
&lt;P style="font-style: italic;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Related Content&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;A href="https://community.qlik.com/t5/Knowledge/Qlik-Replicate-Implementing-UPSERT-and-MERGE-modes-by-applying-a/ta-p/1780009" target="_blank" rel="noopener"&gt;Qlik Replicate: Implementing UPSERT and MERGE modes by applying a Conflicts Handling Policy &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;LI-PRODUCT title="Qlik Replicate" id="qlikReplicate"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Log Stream&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Tue, 14 Feb 2023 15:51:24 GMT</pubDate>
    <dc:creator>Michael_Litz</dc:creator>
    <dc:date>2023-02-14T15:51:24Z</dc:date>
    <item>
      <title>Qlik Replicate: Starting Log Stream Tasks with Timestamp</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Starting-Log-Stream-Tasks-with-Timestamp/ta-p/1879839</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Content:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-TOC indent="15" liststyle="none" maxheadinglevel="3"&gt;&lt;/LI-TOC&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Restart with a timestamp for both log stream staging (parent) and replication (child) tasks&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;Sometimes a log stream task pair will stop processing CDC data and you may need to restart the tasks with a timestamp in order to get the CDC flowing again.&lt;/P&gt;
&lt;P&gt;If you are going to restart a log stream task with a timestamp, the same timestamp must be used for each task, the staging task and the replication task.&lt;/P&gt;
&lt;P&gt;NOTE: If you start the staging task from a timestamp you must start all associated replication tasks with the same timestamp.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Restart with a timestamp for replication task only&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;If you want to just restart with a timestamp on the replication task and you do not know the correct time stamp you can find it following these 3 steps.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Restart the replication task with any timestamp you want - this will generate a log entry.&lt;/LI&gt;
&lt;LI&gt;Use the generated timestamp in the above log line "last source timestamp 1640589670000000" - this number should be converted using this link: &lt;A href="https://www.epochconverter.com/" target="_blank" rel="noopener"&gt;https://www.epochconverter.com/&lt;/A&gt; . This timestamp should then be adjust to the time zone of the Replicate console (if they differ).&lt;/LI&gt;
&lt;LI&gt;Use this timestamp to restart the replication task.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Configuration tips:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;For an Oracle source log stream task&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;What are the chances of data duplication if we start the staging task with a past SCN number?&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Answer:&lt;/STRONG&gt; Chances are good there will be issues. The following setting on Error Handling /&amp;nbsp;Apply Conflicts will mitigate them.&lt;BR /&gt;&lt;BR /&gt;In the Error Handling /&amp;nbsp;Apply Conflicts select Ignore record, for all 3 settings. Alternatively, if the target DB handles deletes okay you could set the above to Upsert / Merge mode.&lt;BR /&gt;&lt;BR /&gt;Reference:&amp;nbsp;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://community.qlik.com/t5/Knowledge/Qlik-Replicate-Implementing-UPSERT-and-MERGE-modes-by-applying-a/ta-p/1780009" target="_blank" rel="noopener"&gt;Qlik Replicate: Implementing UPSERT and MERGE modes by applying a Conflicts Handling Policy&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;There are a few options in apply conflicts policy, what exact options we should use to avoid data duplication after starting the parent task with the SCN number?&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Answer:&lt;/STRONG&gt; Replicate will process CDC again, events for inserts, deletes and updates will be replayed. The above apply conflicts will suffice.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;How do we get the exact SCN number from Oracle Source?&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Answer:&lt;/STRONG&gt; There are two options to get the correct timestamp:&lt;BR /&gt;&lt;BR /&gt;
&lt;OL class="lia-list-style-type-lower-alpha"&gt;
&lt;LI&gt;On the same line in the log file, from which the SCN was taken, you can see an indication of the equivalent source timestamp, for example - "last source timestamp 1640589670000000" - this number should be converted using this link: &lt;A style="font-family: inherit; background-color: #ffffff;" href="https://www.epochconverter.com/" target="_blank" rel="noopener"&gt;https://www.epochconverter.com/&lt;/A&gt;&lt;SPAN&gt; . This timestamp should then be adjusted to the time zone of the Qlik Replicate console (if they differ).&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Use Oracle command - &lt;FONT face="courier new,courier"&gt;SELECT SCN_TO_TIMESTAMP(ORA_SCN) FROM DUAL&lt;/FONT&gt;; instead of &lt;FONT face="courier new,courier"&gt;ORA_SCN&lt;/FONT&gt; put the SCN in decimal format, that was used for the LS task.&lt;BR /&gt;&lt;BR /&gt;The timestamp can be used for both the log stream staging and the replicate tasks (instead of using the SCN)&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-style: italic;"&gt;The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.&lt;/P&gt;
&lt;P style="font-style: italic;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Related Content&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;A href="https://community.qlik.com/t5/Knowledge/Qlik-Replicate-Implementing-UPSERT-and-MERGE-modes-by-applying-a/ta-p/1780009" target="_blank" rel="noopener"&gt;Qlik Replicate: Implementing UPSERT and MERGE modes by applying a Conflicts Handling Policy &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;LI-PRODUCT title="Qlik Replicate" id="qlikReplicate"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Log Stream&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 14 Feb 2023 15:51:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Starting-Log-Stream-Tasks-with-Timestamp/ta-p/1879839</guid>
      <dc:creator>Michael_Litz</dc:creator>
      <dc:date>2023-02-14T15:51:24Z</dc:date>
    </item>
  </channel>
</rss>

