Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You have to drop the table (article) from the publication and re-add it with a new filter. The trick is that if you remove the subscription to the article before removing the article from the publication, you will not be required to deliver an entire snapshot for all article – but only for the single table (and it’s new filter).</p> <pre><code>--Drop existing subscription: EXEC sp_dropsubscription @publication='&lt;pub_name', @article='&lt;article_name', @subscriber='&lt;sub_name', @destination_db='&lt;db_name&gt;', @ignore_distributor=0 --Drop the article from the publication: EXEC sp_droparticle @publication='&lt;pub_name', @article='&lt;article_name', @ignore_distributor=0, @force_invalidate_snapshot=1 </code></pre> <p>Now, the easiest way to add the article back to the subscription is through the replication publication GUI, you can add the article, add the filter then click ok. When you run the snapshot job, it will only generate a snapshot for the single table. This is known as a mini-snapshot.</p> <p>If you want to manually re-add the article and its filter to the publication then you'll need to do the following to get it back into the subscription.</p> <pre><code>--Re-add the subscription to the article. EXEC sp_addsubscription @publication = @publication='&lt;pub_name', @article = @article='&lt;article_name', @subscriber = @subscriber='&lt;sub_name', @destination_db='&lt;db_name&gt;', @sync_type = 'automatic ', @subscription_type = 'push', @update_mode = 'read only' </code></pre> <p>--You will now need to manually add any new columns to the destination table at the subscriber, re-run the snapshot agent which will run a mini-snapshot... then kick off the distributor.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload