<?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 Video Transcript: Setting up Bi-Directional Replication in Video Transcripts</title>
    <link>https://community.qlik.com/t5/Video-Transcripts/Video-Transcript-Setting-up-Bi-Directional-Replication/ta-p/1740645</link>
    <description>&lt;DIV class="vid-desc lia-message-template-desc-zone"&gt;
&lt;DIV&gt;&lt;STRONG&gt;Description:&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV class="video-description"&gt;
&lt;P&gt;Video Transcript: Setting up Bi-Directional Replication&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="vid-Link lia-message-template-desc-zone"&gt;&lt;STRONG&gt;Video:&lt;/STRONG&gt;
&lt;DIV class="video-hyperlink"&gt;
&lt;P&gt;&lt;div class="video-embed-center video-embed"&gt;&lt;iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F7Nl1ZZK6Ddg%3Ffeature%3Doembed&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D7Nl1ZZK6Ddg&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F7Nl1ZZK6Ddg%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" width="200" height="112" scrolling="no" title="Bi Directional Replication Tasks" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="vid-Transcript lia-message-template-desc-zone"&gt;
&lt;H2&gt;Transcript:&lt;/H2&gt;
&lt;DIV id="id-trans" class="video-transcript" tabindex="0"&gt;
&lt;P&gt;&lt;EM&gt;This session will explore Bi-Directional Replication tasks with Qlik Replicate.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;We will review different replication topologies,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Concentrating on the bi-directional feature, including the setting “Loopback prevention.”&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;How bi-directional tasks are initiated, the limitations&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And you will see these demonstrated.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;In general, there are different types of Replications.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Uni-directional is the classic type of replication, from A to B.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Bi-Directional is the focus for this session, from A to B and from B to A.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Multi-directional means that there are several end points. With each end point able to replicate to other end points.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Many to One, means that there are several sources, that are replicating to a single hub or target.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Broadcast replication means that there is a single source, and every change made on that source is replicated to several targets.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And the Cascading replication option means replication is from A to B and then from B to several additional targets.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now to focus on the Bi-Directional feature.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;First there are two main steps.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;There must be an initial synchronization between the two end points.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This is done with a Full Load only task from A to B.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And then, if there are tables that only exist on B,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp;to include those tables, they must also be replicated from B to A with a Full Load task.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So the initial synchronization is complete when both end points have the same data.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Once that first step is complete, the Bi-directional tasks must be defined.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;One that captures the changes from A and replicates them to B;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And one that captures the changes from B and replicates them to end point A.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This is how the task settings look. The Replication Profile must be set as Bi-Directional.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The will only be a CDC task, so full load will be disabled.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Once the bi-directional task is defined, this chart will be displayed.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;In this example, it shows that it’s replicating from BD-MySQL1 to BD-MySQL 4.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The light grey line shows that it’s bi-directional.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So there should also be second task that does the opposite, replicating from the target of this task to the sources of this task.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;These tasks should be set for all tables that you want to be updated on both points, meaning having the same data at both sites.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;It’s important that the starting point is a synchronized one.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Next, the Loopback Prevention must be defined.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This setting will prevent changes from being replicated in an endless loop.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;A schema will be defined that sets an update table with the last changes.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This is what the Loopback settings look like.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This settings tab is enabled with bi-directional tasks.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Schemas need to be set at the source and the target. This will hold a special table recording recent changes of updates.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;It’s important that these settings are set on both bi-directional tasks to be opposite of each other.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So these settings on the second bi-directional task will have loopback 2 as the source and loopback 1 as the target.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Another important setting is that bi-directional tasks must be set to Transactional Apply mode. As opposed to Batch Apply mode.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So once some Full Load tasks have run to accomplish the initial synchronization of the end points – Wait until they are completed,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;and the bi-directional tasks have been defined and set correctly, so we’re ready to start updating both end points with changes.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So changes from A will be replicated to B and changes from B will be replicated to A.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And the loopback prevention schemas have been defined.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;It’s important to understand why bi-directional tasks must be set in transactional mode.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Changes need to be recorded with the latest time stamp, and in the correct order. Running in Transactional mode does not affect performance.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;One limitation with bi-directional tasks, is that there is no support for conflict resolution.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This means that if there IS a conflict, the bi-directional replication tasks will need to be stopped. Then Full Load tasks need to be run on both sides, creating a new synchronization starting point, and then the bi-directional tasks can be re-initiated.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;There are other limitations regarding the use of transformation and filters.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Full Load tasks are not the same as bi-directional tasks; and CDC is supported only in transactional mode.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now for a demo&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;First, the Full Load task should be defined.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Create a new task – uni-directional. Set to Full Load.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Set the end points – from A or “BD-my SQL 1” to B – or “BD-mySQL4.”&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now, choosing the tables. BD tables 1 and 2.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And save.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now let’s run the Full Load Only task.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And now create the two bi-directional tasks.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The first one, set to Bidirectional, and Apply Changes. Ok.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;There you can see the diagram with the second light grey line.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Set the end points, A to B. from Bd-mySQL 1 to Bd-mySQL 4.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Save.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now on task Settings, on the bidirectional tab, specify the loopback prevention schema.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And under Change Processing Tuning, change it to transactional mode.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Select the tables, bd-table 1 and bd_table 2.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Save.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now to create the second bi-directional task.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Again, bidirectional, Apply.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now set the end points for the second bidirectional task to be the opposite of the first.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now this is important. There are two databases here.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Each one needs to be defined as a source AND as a target.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So this is the same database as bd-mySQL 4, but when defined as a source, it has a different name,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Which is bd-mySQL 3.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The same name cannot be used for both Source and Target.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Set the tables.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now that the Full load task has run and the two bidirectional tasks are defined, start the bi-directional tasks.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Here you can see that the task will not run until the loopback prevention is set. And here it should be the opposite of the first.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now to record changes.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;For example, BD-MySQL 1 is on server ShaiP-rep2.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So I’ll go to that server where the data is currently.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And a change is made.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now back to replicate.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;You can see here that there was one insert picked up by the first bi-directional task and replicated. But that will not be picked up here on the second task, because of loop prevention.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So, loop prevention is working fine.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;To take a closer look at the table. And you can see that the change was recorded here.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If another change is entered, you can see that the time was updated to the newest change.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If I select the correct table, you can see the changes that I inserted here.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Going back to the bi-directional tasks, two changes have been recorded.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I’ve just showed that I can replicate from both sites, as long as there are not conflicts, it should be fine.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And that loopback prevention has prevented them from being picked up by the second task.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;A common problem with bi-directional tasks is loop back prevention.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Make a change on A, it goes to B;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;and I don’t want to pick that change back up again and move it back to A.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The whole idea here, is that for every transaction that Replicate does, it’s going to add an update to the loopback prevention table.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So when Replicate reads a transaction, if that table is in the transaction, the transaction is thrown away. That’s needs to be clear. That’s why bi-directional tasks need to be in transaction apply mode, because you want full transactions on the target, and why batch apply mode is not supported with this type of task.&lt;/EM&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 10 Nov 2020 07:10:47 GMT</pubDate>
    <dc:creator>David_Fergen</dc:creator>
    <dc:date>2020-11-10T07:10:47Z</dc:date>
    <item>
      <title>Video Transcript: Setting up Bi-Directional Replication</title>
      <link>https://community.qlik.com/t5/Video-Transcripts/Video-Transcript-Setting-up-Bi-Directional-Replication/ta-p/1740645</link>
      <description>&lt;DIV class="vid-desc lia-message-template-desc-zone"&gt;
&lt;DIV&gt;&lt;STRONG&gt;Description:&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV class="video-description"&gt;
&lt;P&gt;Video Transcript: Setting up Bi-Directional Replication&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="vid-Link lia-message-template-desc-zone"&gt;&lt;STRONG&gt;Video:&lt;/STRONG&gt;
&lt;DIV class="video-hyperlink"&gt;
&lt;P&gt;&lt;div class="video-embed-center video-embed"&gt;&lt;iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F7Nl1ZZK6Ddg%3Ffeature%3Doembed&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D7Nl1ZZK6Ddg&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F7Nl1ZZK6Ddg%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" width="200" height="112" scrolling="no" title="Bi Directional Replication Tasks" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="vid-Transcript lia-message-template-desc-zone"&gt;
&lt;H2&gt;Transcript:&lt;/H2&gt;
&lt;DIV id="id-trans" class="video-transcript" tabindex="0"&gt;
&lt;P&gt;&lt;EM&gt;This session will explore Bi-Directional Replication tasks with Qlik Replicate.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;We will review different replication topologies,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Concentrating on the bi-directional feature, including the setting “Loopback prevention.”&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;How bi-directional tasks are initiated, the limitations&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And you will see these demonstrated.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;In general, there are different types of Replications.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Uni-directional is the classic type of replication, from A to B.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Bi-Directional is the focus for this session, from A to B and from B to A.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Multi-directional means that there are several end points. With each end point able to replicate to other end points.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Many to One, means that there are several sources, that are replicating to a single hub or target.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Broadcast replication means that there is a single source, and every change made on that source is replicated to several targets.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And the Cascading replication option means replication is from A to B and then from B to several additional targets.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now to focus on the Bi-Directional feature.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;First there are two main steps.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;There must be an initial synchronization between the two end points.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This is done with a Full Load only task from A to B.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And then, if there are tables that only exist on B,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp;to include those tables, they must also be replicated from B to A with a Full Load task.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So the initial synchronization is complete when both end points have the same data.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Once that first step is complete, the Bi-directional tasks must be defined.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;One that captures the changes from A and replicates them to B;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And one that captures the changes from B and replicates them to end point A.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This is how the task settings look. The Replication Profile must be set as Bi-Directional.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The will only be a CDC task, so full load will be disabled.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Once the bi-directional task is defined, this chart will be displayed.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;In this example, it shows that it’s replicating from BD-MySQL1 to BD-MySQL 4.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The light grey line shows that it’s bi-directional.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So there should also be second task that does the opposite, replicating from the target of this task to the sources of this task.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;These tasks should be set for all tables that you want to be updated on both points, meaning having the same data at both sites.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;It’s important that the starting point is a synchronized one.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Next, the Loopback Prevention must be defined.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This setting will prevent changes from being replicated in an endless loop.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;A schema will be defined that sets an update table with the last changes.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This is what the Loopback settings look like.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This settings tab is enabled with bi-directional tasks.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Schemas need to be set at the source and the target. This will hold a special table recording recent changes of updates.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;It’s important that these settings are set on both bi-directional tasks to be opposite of each other.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So these settings on the second bi-directional task will have loopback 2 as the source and loopback 1 as the target.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Another important setting is that bi-directional tasks must be set to Transactional Apply mode. As opposed to Batch Apply mode.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So once some Full Load tasks have run to accomplish the initial synchronization of the end points – Wait until they are completed,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;and the bi-directional tasks have been defined and set correctly, so we’re ready to start updating both end points with changes.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So changes from A will be replicated to B and changes from B will be replicated to A.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And the loopback prevention schemas have been defined.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;It’s important to understand why bi-directional tasks must be set in transactional mode.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Changes need to be recorded with the latest time stamp, and in the correct order. Running in Transactional mode does not affect performance.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;One limitation with bi-directional tasks, is that there is no support for conflict resolution.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This means that if there IS a conflict, the bi-directional replication tasks will need to be stopped. Then Full Load tasks need to be run on both sides, creating a new synchronization starting point, and then the bi-directional tasks can be re-initiated.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;There are other limitations regarding the use of transformation and filters.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Full Load tasks are not the same as bi-directional tasks; and CDC is supported only in transactional mode.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now for a demo&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;First, the Full Load task should be defined.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Create a new task – uni-directional. Set to Full Load.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Set the end points – from A or “BD-my SQL 1” to B – or “BD-mySQL4.”&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now, choosing the tables. BD tables 1 and 2.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And save.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now let’s run the Full Load Only task.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And now create the two bi-directional tasks.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The first one, set to Bidirectional, and Apply Changes. Ok.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;There you can see the diagram with the second light grey line.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Set the end points, A to B. from Bd-mySQL 1 to Bd-mySQL 4.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Save.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now on task Settings, on the bidirectional tab, specify the loopback prevention schema.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And under Change Processing Tuning, change it to transactional mode.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Select the tables, bd-table 1 and bd_table 2.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Save.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now to create the second bi-directional task.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Again, bidirectional, Apply.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now set the end points for the second bidirectional task to be the opposite of the first.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now this is important. There are two databases here.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Each one needs to be defined as a source AND as a target.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So this is the same database as bd-mySQL 4, but when defined as a source, it has a different name,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Which is bd-mySQL 3.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The same name cannot be used for both Source and Target.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Set the tables.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now that the Full load task has run and the two bidirectional tasks are defined, start the bi-directional tasks.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Here you can see that the task will not run until the loopback prevention is set. And here it should be the opposite of the first.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now to record changes.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;For example, BD-MySQL 1 is on server ShaiP-rep2.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So I’ll go to that server where the data is currently.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And a change is made.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Now back to replicate.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;You can see here that there was one insert picked up by the first bi-directional task and replicated. But that will not be picked up here on the second task, because of loop prevention.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So, loop prevention is working fine.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;To take a closer look at the table. And you can see that the change was recorded here.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If another change is entered, you can see that the time was updated to the newest change.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If I select the correct table, you can see the changes that I inserted here.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Going back to the bi-directional tasks, two changes have been recorded.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I’ve just showed that I can replicate from both sites, as long as there are not conflicts, it should be fine.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;And that loopback prevention has prevented them from being picked up by the second task.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;A common problem with bi-directional tasks is loop back prevention.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Make a change on A, it goes to B;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;and I don’t want to pick that change back up again and move it back to A.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The whole idea here, is that for every transaction that Replicate does, it’s going to add an update to the loopback prevention table.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So when Replicate reads a transaction, if that table is in the transaction, the transaction is thrown away. That’s needs to be clear. That’s why bi-directional tasks need to be in transaction apply mode, because you want full transactions on the target, and why batch apply mode is not supported with this type of task.&lt;/EM&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 Nov 2020 07:10:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Video-Transcripts/Video-Transcript-Setting-up-Bi-Directional-Replication/ta-p/1740645</guid>
      <dc:creator>David_Fergen</dc:creator>
      <dc:date>2020-11-10T07:10:47Z</dc:date>
    </item>
  </channel>
</rss>

