<?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 Rudi Bruchez</title><link>https://www.pachadata.com/en/docs/howtos/replication/</link><description>Recent content in Replication on Rudi Bruchez</description><generator>Hugo</generator><language>en</language><atom:link href="https://www.pachadata.com/en/docs/howtos/replication/index.xml" rel="self" type="application/rss+xml"/><item><title>Adding columns to a replicated table</title><link>https://www.pachadata.com/en/docs/howtos/replication/alter-table/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.pachadata.com/en/docs/howtos/replication/alter-table/</guid><description>&lt;p&gt;When you add tables to transactional replication and you want replication to propagate column additions made by third-party applications, you can run into a permission problem.&lt;/p&gt;&#10;&lt;p&gt;By default, replication requires the user who alters the table and adds a column to be either &lt;code&gt;sysadmin&lt;/code&gt; or &lt;code&gt;db_owner&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;You may well have applications that do not hold those permissions and still need to add columns to replicated tables.&lt;/p&gt;&#10;&lt;p&gt;To work around this, we can bend the database DDL trigger that fires on &lt;code&gt;ALTER TABLE&lt;/code&gt;, adding the &lt;code&gt;EXECUTE AS SELF&lt;/code&gt; option to it. When you make that change you must be &lt;code&gt;sysadmin&lt;/code&gt; or &lt;code&gt;db_owner&lt;/code&gt; yourself: &lt;code&gt;EXECUTE AS SELF&lt;/code&gt; makes the trigger run under the same execution context as the one you had when you altered it.&lt;/p&gt;</description></item></channel></rss>