<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Replication on Andy M Mallon - AM²</title><link>https://am2.co/tag/replication/</link><description>Recent content in Replication on Andy M Mallon - AM²</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 18 Aug 2022 22:56:09 -0400</lastBuildDate><atom:link href="https://am2.co/tag/replication/index.xml" rel="self" type="application/rss+xml"/><item><title>snapshot replication - corrupted BCP files</title><link>https://am2.co/2022/08/18/snapshot-replication-corrupted-bcp-files/</link><pubDate>Thu, 18 Aug 2022 22:56:09 -0400</pubDate><guid>https://am2.co/2022/08/18/snapshot-replication-corrupted-bcp-files/</guid><description>&lt;p&gt;&lt;a href="https://dba.stackexchange.com/q/315798/52344"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;Each night my SQLServer replication failed on a big table with the following error. It is failing on a different table each night but always on a relatively big table ( &amp;gt; 200,000 rows)&lt;/p&gt;&#10;&lt;p&gt;The process could not bulk copy into table '&amp;quot;dbo&amp;quot;.&amp;quot;Table01&amp;quot;'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20037)&lt;br /&gt;&#10;Get help: http://help/MSSQL_REPL20037&lt;br /&gt;&#10;&lt;strong&gt;Field size too large&lt;br /&gt;&#10;Batch send failed&lt;/strong&gt;&lt;br /&gt;&#10;Violation of PRIMARY KEY constraint 'PK_Table01'. Cannot insert duplicate key in object 'dbo.Table01'. The duplicate key value is (0). (Source: MSSQLServer, Error number: 2627)&lt;br /&gt;&#10;Get help: http://help/2627&lt;br /&gt;&#10;Failed to send batch after max errors (Source: MSSQLServer, Error number: 3621)&lt;br /&gt;&#10;Get help: http://help/3621&lt;/p&gt;</description></item><item><title>Can I use both Log Shipping and Transaction Replication at the same time?</title><link>https://am2.co/2021/10/15/can-i-use-both-log-shipping-and-transaction-replication-at-the-same-time/</link><pubDate>Fri, 15 Oct 2021 11:36:11 -0400</pubDate><guid>https://am2.co/2021/10/15/can-i-use-both-log-shipping-and-transaction-replication-at-the-same-time/</guid><description>&lt;p&gt;&lt;a href="https://serverfault.com/q/1080640/299354"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;Good Morning, I have a SQL Server 2016 that is doing Log Shipping to a DR Site. I currently want to also to Replicate (Transactional) specific Tables to another Server for Reporting Purposes.&lt;/p&gt;&#10;&lt;p&gt;Will there be any issues or snafu&amp;rsquo;s I should be aware of? Can I have Log Shipping and Transactional Replication configured on the same Publishing Database?&lt;/p&gt;</description></item><item><title>SQL Server replication additional subscriber</title><link>https://am2.co/2021/09/15/sql-server-replication-additional-subscriber/</link><pubDate>Wed, 15 Sep 2021 08:48:16 -0400</pubDate><guid>https://am2.co/2021/09/15/sql-server-replication-additional-subscriber/</guid><description>&lt;p&gt;&lt;a href="https://dba.stackexchange.com/q/299611/52344"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;I have a publisher with the distributor on the same server which is transactional replication.&#10;There is also an active subscriber using push method.&lt;/p&gt;&#10;&lt;p&gt;I need to set a new subscriber up going to a different server using the same articles as the current subscriber I have. The database is huge and cannot be taken offline so I was going to do an initialize from backup instead of a new snapshot.&lt;/p&gt;</description></item><item><title>Replication of only updates and inserts</title><link>https://am2.co/2020/10/14/replication-of-only-updates-and-inserts/</link><pubDate>Wed, 14 Oct 2020 16:01:08 -0400</pubDate><guid>https://am2.co/2020/10/14/replication-of-only-updates-and-inserts/</guid><description>&lt;p&gt;&lt;a href="https://dba.stackexchange.com/q/278071/52344"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;I have two sql servers, in the first I want to keep the data from the last three months and in the second I want to keep all the data with the purpose of getting historical reports.&#10;I know how to do a transactional replica but I don't know how to replicate only the inserts and updates, I don't want to replicate the deletions.&lt;/p&gt;</description></item><item><title>Replication latency when an Availability Group replica is offline</title><link>https://am2.co/2020/05/04/replication-latency-when-an-availability-group-replica-is-offline/</link><pubDate>Mon, 04 May 2020 10:02:52 -0400</pubDate><guid>https://am2.co/2020/05/04/replication-latency-when-an-availability-group-replica-is-offline/</guid><description>&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=w0nNbs8ldGY" rel="noopener noreferrer" target="_blank"&gt;&lt;img src="https://am2.co/wp-content/uploads/stormtrooper-1343772_1920-1024x529.jpg" alt="" width="512" height="265" class="alignright size-large wp-image-3224" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;Assume you have configured a transactional replication publisher, which is part of an availability group (AG). Now, you have an asynchronous secondary AG (or mirroring) replica that is offline. Perhaps this is a DR node, and you are doing patching or other planned maintenance on that DR node, with it intentionally offline.&lt;/p&gt;</description></item><item><title>Configuring the distribution database in an Availability Group</title><link>https://am2.co/2019/04/08/configuring-the-distribution-database-in-an-availability-group/</link><pubDate>Mon, 08 Apr 2019 08:00:23 -0400</pubDate><guid>https://am2.co/2019/04/08/configuring-the-distribution-database-in-an-availability-group/</guid><description>&lt;figure class="wp-caption alignright" style="max-width:600px"&gt;&lt;a href="https://www.youtube.com/watch?v=5qSrmeiWsuc" rel="noopener noreferrer" target="_blank"&gt;&lt;img src="https://am2.co/wp-content/uploads/Replication.jpg" alt="" width="600" height="488" class="size-medium wp-image-1749" /&gt;&lt;/a&gt; I 💜 Replication&lt;/figure&gt;&#10;&lt;p&gt;Starting with SQL Server 2017 CU6 and SQL Server 2016 SP2-CU3, you can now configure your distribution database as part of an Availability Group (AG). Up until now, your distribution database could only be part of a standalone instance, or failover cluster instance (FCI). In this first round, there&amp;rsquo;s a pretty big &lt;a href="https://docs.microsoft.com/en-us/sql/relational-databases/replication/configure-distribution-availability-group" rel="noopener noreferrer" target="_blank"&gt;list of limitations &amp;amp; restrictions&lt;/a&gt;. In fact, you&amp;rsquo;ll notice that the &amp;ldquo;supported scenarios&amp;rdquo; list is shorter than the &amp;ldquo;limitations or exclusions.&amp;rdquo;&lt;/p&gt;</description></item><item><title>How to pause the subscriber end of transactional replication</title><link>https://am2.co/2019/02/12/how-to-pause-the-subscriber-end-of-transactional-replication/</link><pubDate>Tue, 12 Feb 2019 08:10:04 -0500</pubDate><guid>https://am2.co/2019/02/12/how-to-pause-the-subscriber-end-of-transactional-replication/</guid><description>&lt;p&gt;&lt;a href="https://dba.stackexchange.com/q/229484/52344"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;How do I go about pausing transactional replication on the subscriber end.&lt;/p&gt;&#10;&lt;p&gt;We have a publisher on Server A, a distributor on Server B and a subscriber on Server C. All are in the same network.&lt;/p&gt;&#10;&lt;p&gt;Some background, we have quite a busy BizTalk server where we replicate the data from the BAM parts to a separate database server which will be used for a customized web application for statistics, searching etc. Seeing as the tables in the BizTalk server are both quite large and missing indexes etc since they're basically just there to have data dumped into them we opted to have the second, replicated database in which we can apply various optimizations for reading the data.&lt;/p&gt;</description></item><item><title>how azure sql geo replication works internally?</title><link>https://am2.co/2018/11/02/how-azure-sql-geo-replication-works-internally/</link><pubDate>Fri, 02 Nov 2018 10:22:13 -0400</pubDate><guid>https://am2.co/2018/11/02/how-azure-sql-geo-replication-works-internally/</guid><description>&lt;p&gt;&lt;a href="https://dba.stackexchange.com/q/221625/52344"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;My company moved to azure and started to use azure Sql database and geo replication.&lt;/p&gt;&#10;&lt;p&gt;For our on-premise servers, we heavily rely on Microsoft transactional replication to move data. Now we setup transactional replication between on-premise server (publisher) and azure sql db. Then we found that the transactional replication itself is constantly consuming 100% DTU on azure(we are using a 125 DTU P1).&lt;/p&gt;</description></item><item><title>How can I permanently remove replication by script if I only have access to the subscriber?</title><link>https://am2.co/2018/10/23/how-can-i-permanently-remove-replication-by-script-if-i-only-have-access-to-the-subscriber/</link><pubDate>Tue, 23 Oct 2018 23:10:17 -0400</pubDate><guid>https://am2.co/2018/10/23/how-can-i-permanently-remove-replication-by-script-if-i-only-have-access-to-the-subscriber/</guid><description>&lt;p&gt;&lt;a href="https://dba.stackexchange.com/q/220528/52344"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;We've been building a replication network of DBs to give us some degree of Always On without paying the full price tag. Currently we have a publisher DB which replicates to a handful of subscribers, so that if the publisher goes down, we can promote a subscriber to be the new publisher. As is, this is a tedious manual process, but we want to start scripting elements of it so that the process is quicker and closer to being automated.&lt;/p&gt;</description></item><item><title>Configuring Replication with Availability Groups</title><link>https://am2.co/2018/02/23/replication-availability-groups-2/</link><pubDate>Fri, 23 Feb 2018 10:00:41 -0500</pubDate><guid>https://am2.co/2018/02/23/replication-availability-groups-2/</guid><description>&lt;figure class="wp-caption alignright" style="max-width:500px"&gt;&lt;a href="https://www.youtube.com/watch?v=_HONxwhwmgU&amp;amp;feature=youtu.be&amp;amp;t=3m3s" target="_blank" rel="noopener noreferrer"&gt;&lt;img class="wp-image-1347" src="https://am2.co/wp-content/uploads/clones-300x171.jpg" alt="" width="500" height="284" /&gt;&lt;/a&gt; I fancy myself more of a Jedi, but I appreciate the Empire's dedication to replication&lt;/figure&gt;&#10;&lt;p&gt;I&amp;rsquo;ve used replication and Availability Groups together before. Replication works great with an AG as both a publisher or a subscriber (though, not as a distributor&amp;ndash;you can&amp;rsquo;t add the distribution database to an AG).  I was surprised when I recently ran into a problem configuring replication on a database that was in an AG.&lt;/p&gt;</description></item><item><title>Transaction Replication on AlwaysOn</title><link>https://am2.co/2017/04/17/transaction-replication-on-alwayson/</link><pubDate>Mon, 17 Apr 2017 22:21:43 -0400</pubDate><guid>https://am2.co/2017/04/17/transaction-replication-on-alwayson/</guid><description>&lt;p&gt;&lt;a href="https://dba.stackexchange.com/q/171244/52344"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;In our AlwayOn environment I have two SQL servers 2014 Ent.edition (SERVER A, and SERVER B). I setup a transaction replication for [database A ], pointing to listener which shouldn't cause any issue if a failover happened. Tested, worked just fine after a failover, but when I shut off one of the servers in AOAG ,in test environment, replication stops working. There is no error on the replication monitor. For testing purpose,I have inserted few records on the database it works fine on AOAG, but on the Subscriber the data modification is not replicated until I bring up the other server. Once the server is up, then the replication start to work. I'm pretty sure, I might be missing something, this can't be this way by design. &lt;/p&gt;</description></item><item><title>Podcast: Mirroring, Availability Groups, Replication, and Log shipping</title><link>https://am2.co/2016/08/31/podcast-mirroring-availability-groups-replication-log-shipping/</link><pubDate>Wed, 31 Aug 2016 09:29:03 -0400</pubDate><guid>https://am2.co/2016/08/31/podcast-mirroring-availability-groups-replication-log-shipping/</guid><description>&lt;p&gt;&lt;a href="http://sqldatapartners.com/podcast/"&gt;&lt;img class="alignright wp-image-621 size-medium" src="https://am2.co/wp-content/uploads/SQLDataPartnersPodcast-300x300.png" alt="SQL Data Partners Podcast" width="300" height="300" /&gt;&lt;/a&gt;Have you ever wondered what the best option is for making your data available in your environment? I was asked by Carlos L Chacon (&lt;a href="http://sqldatapartners.com/author/carlosjr/" target="_blank"&gt;blog&lt;/a&gt;|&lt;a href="https://twitter.com/CarlosLChacon" target="_blank"&gt;twitter&lt;/a&gt;) to be part of a panel on his podcast for an episode discussing some of the options&amp;ndash;availability groups, mirroring, log shipping, and replication. We cover each topic in detail and explain the positives and negatives of each one.&lt;/p&gt;</description></item><item><title>Moving Replication to a new server (without re-snapshotting)</title><link>https://am2.co/2014/07/08/moving-replication-to-a-new-server-without-re-snapshotting/</link><pubDate>Tue, 08 Jul 2014 19:57:00 -0400</pubDate><guid>https://am2.co/2014/07/08/moving-replication-to-a-new-server-without-re-snapshotting/</guid><description>&lt;h3 id="background"&gt;Background&lt;/h3&gt;&#10;&lt;figure class="wp-caption alignright" style="max-width:400px"&gt;&lt;a href="https://youtu.be/A0inwcbSPHY" target="_blank"&gt;&lt;img src="https://am2.co/wp-content/uploads/jakob-owens-109151-unsplash.jpg" alt="" width="400" height="266" /&gt;&lt;/a&gt; The guy in this picture is a Snapshot Agent&lt;/figure&gt;&#10;&lt;p&gt;At work, we make very extensive use of transactional replication. We have dozens of publications. Most publications have two or three subscribers. We replicate across domains, across subnets, across geographies. We use both push &amp;amp; pull replication (we&amp;rsquo;ve found pull works best when crossing the globe).&lt;/p&gt;</description></item></channel></rss>